getParameter method

Vector3 getParameter(
  1. Vector3 point,
  2. Vector3 target
)

Implementation

Vector3 getParameter(Vector3 point, Vector3 target) {
  // This can potentially have a divide by zero if the box
  // has a size dimension of 0.

  return target.set(
      (point.x - min.x) / (max.x - min.x), (point.y - min.y) / (max.y - min.y), (point.z - min.z) / (max.z - min.z));
}