code: function orientationIndex(p1, p2, q) {
    const dx1 = p2[0] - p1[0],
      dy1 = p2[1] - p1[1],
      dx2 = q[0] - p2[0],
      dy2 = q[1] - p2[1];
  
    return Math.sign(dx1 * dy2 - dx2 * dy1);
  }
docs: Returns the direction of the point q relative to the vector p1 -> p2.
  Implementation of geos::algorithm::CGAlgorithm::orientationIndex()
  (same as geos::algorithm::CGAlgorithm::computeOrientation())
  
  @param {Number[]} p1 - the origin point of the vector
  @param {Number[]} p2 - the final point of the vector
  @param {Number[]} q - the point to compute the direction to
  
  @returns {Number} - 1 if q is ccw (left) from p1->p2,
  -1 if q is cw (right) from p1->p2,
  0 if q is colinear with p1->p2