clampPoint method
point - Vector3 to clamp.
target — the result will be copied into this Vector3.
Clamps the
point within the bounds of this box.
Implementation
Vector3 clampPoint(Vector3 point, Vector3 target) {
return target.setFrom(point).clamp(min, max);
}