<commit_before>var m = require('matrix-utilities')

//[x, y, scale], [x, y, scalar]
module.exports = function (coords, transform) {
  var ma0 = m.Identity()
  var ma1 = m.Identity()
  var ma2
  var transformMatrix
  var outMatrix

  ma0[0][3] = coords.vector[0] //x
  ma0[1][3] = coords.vector[1] //y
  ma0[0][0] = coords.scale //k
  ma0[1][1] = coords.scale //k

  ma1[0][3] = transform.vector[0] //x
  ma1[1][3] = transform.vector[1] //y

  if (transform.scale && transform.scale !== 1) { //zoom to/from a point scalar[0], scalar[1]
    ma1[0][0] = transform.scale
    ma1[1][1] = transform.scale

    ma2 = m.Identity()
    ma2[0][3] = -transform.vector[0]
    ma2[1][3] = -transform.vector[1]

    transformMatrix = m.multiply(ma1, ma2)
    outMatrix = m.multiply(ma0, transformMatrix)
  } else { //drag to a point scalar[0], scalar[1]
    outMatrix = m.multiply(ma0, ma1)
  }<commit_msg>rm unused case<commit_after>var m = require('matrix-utilities')

//[x, y, scale], [x, y, scalar]
module.exports = function (coords, transform) {
  var ma0 = m.Identity()
  var ma1 = m.Identity()
  var ma2 = m.Identity()
  var transformMatrix
  var outMatrix

  ma0[0][3] = coords.vector[0] //x
  ma0[1][3] = coords.vector[1] //y
  ma0[0][0] = coords.scale //k
  ma0[1][1] = coords.scale //k

  ma1[0][3] = transform.vector[0] //x
  ma1[1][3] = transform.vector[1] //y
  ma1[0][0] = transform.scale
  ma1[1][1] = transform.scale

  ma2[0][3] = -transform.vector[0]
  ma2[1][3] = -transform.vector[1]

  transformMatrix = m.multiply(ma1, ma2)
  outMatrix = m.multiply(ma0, transformMatrix)
{'fraction_non_alphanumeric': 0.19062697910069665, 'fraction_numerical': 0.058264724509183026, 'mean_word_length': 3.388888888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '2413771', 'n_tokens_mistral': 656, 'n_tokens_neox': 644, 'n_words': 139}