pointToNumber method

double pointToNumber(
  1. Vector3 point
)

Implementation

double pointToNumber(Vector3 point) {
  var start = getStart();
  var end = getEnd();
  var unitVec = (end - start).normalize();
  var prop = unitVec.dot(point - start) / unitVec.dot(end - start);

  return interpolate(xMin, xMax, prop);
}