DistanceToPoint
This function returns the shortest distance between the point and the AABB.
Syntax
- number DistanceToPoint(Vec3 point, number radius=0)
Parameters
- point: the point to test the distance to.
- radius: an optional radius value can be used to test a sphere.
Returns
Returns the shortest distance between the point and the AABB. If the point is inside the AABB, 0 will be returned.