hitDistanceSqr

Computes the squared hit distance for the given ray. If the ray does not intersect this BoundingBox Float.MAX_VALUE is returned. If the ray origin is inside this BoundingBox 0 is returned. The method returns the squared distance because it's faster to compute. If the exact distance is needed the square root of the result has to be taken.

Return

squared distance between origin and the hit point on the BoundingBox surface or Float.MAX_VALUE if the ray does not intersects the BoundingBox

Parameters

ray

The ray to test