DistanceToPoint
This function returns the shortest distance between a plane and a point in space. If the distance is less then one, the point is behind the plane. If the distance is greater than one, the point is in front of the plane. If the distance is zero, the point lies directly on the plane.
Syntax
- float DistanceToPoint(const Vec3& p)
- float DistanceToPoint(float x, float y, float z)
Parameters
- p: the point to check the distance to.
- x: the X component of the point to check the distance to.
- y: the Y component of the point to check the distance to.
- z: the Z component of the point to check the distance to.
Returns
Returns the distance to the specified point.