<commit_before>var c = document.getElementById("trigBan")
var w, h, frame

const ctx = c.getContext('2d')

const trigRad = 20, trigGap = 2, trigRound = 5, trigStroke = 0, defaultColor = "#333", defaultOutline = "#FFF"

const col1 = makeColor(0, 0, 0), col2 = makeColor(255, 255, 255)

function makeColor(r, g, b) {
  return {r: r, g: g, b: b}
}

function rgb(col) {
  r = Math.floor(col.r)
  g = Math.floor(col.g)
  b = Math.floor(col.b)
  return ["rgb(",r,",",g,",",b,")"].join("")
}

function colorGrad(col1, col2, step) {
  return makeColor(
    col1.r + (col2.r - col1.r) * step, 
    col1.g + (col2.g - col1.g) * step,
    col1.b + (col2.b - col1.b) * step
  ) 
}

// Fine function Blindman67 on stackoverflow 
//   https://stackoverflow.com/questions/44855794/html5-canvas-triangle-with-rounded-corners
//   I should be better at math being CS student but it's been a while since
//   trig and algebra classes. 
// ctx is the context to add the path to
// points is a array of points [{x :?, y: ?},...<commit_msg>Corrected color interpolation to use quadratic gradient<commit_after>var c = document.getElementById("trigBan")
var w, h, frame

const ctx = c.getContext('2d')

const trigRad = 20, trigGap = 2, trigRound = 5, trigStroke = 0, defaultColor = "#333", defaultOutline = "#FFF"

const col1 = makeColor(0, 0, 0), col2 = makeColor(255, 255, 255)

function makeColor(r, g, b) {
  return {r: r, g: g, b: b}
}

function rgb(col) {
  r = Math.floor(col.r)
  g = Math.floor(col.g)
  b = Math.floor(col.b)
  return ["rgb(",r,",",g,",",b,")"].join("")
}

function colorGrad(col1, col2, step) {
  var r1 = col1.r ** 2, r2 = col2.r ** 2
  var g1 = col1.g ** 2, g2 = col2.g ** 2
  var b1 = col1.b ** 2, b2 = col2.b ** 2
  
  return makeColor(
    Math.sqrt(r1 + (r2 - r1) * step), 
    Math.sqrt(g1 + (g2 - g1) * step),
    Math.sqrt(b1 + (b2 - b1) * step)
  ) 
}

// Fine function Blindman67 on stackoverflow 
//   https://stackoverflow.com/questions/44855794/html5-canvas-triangle-with-rounded-corners
//   I should be better at math being CS student but it's been a while since
//   trig and algebra classes. 
// ctx is the context to add the path to
// points is a array of points [{x :?, y: ?},...
{'fraction_non_alphanumeric': 0.1702224239673173, 'fraction_numerical': 0.04902405810258738, 'mean_word_length': 3.166351606805293, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4011409', 'n_tokens_mistral': 928, 'n_tokens_neox': 846, 'n_words': 253}