Glare.Box3.NearestPointTo C# (CSharp) Method

NearestPointTo() public method

Get the nearest point between this Box3 and a Vector3. If the Vector3 is inside this Box3, it is returned untouched.
public NearestPointTo ( System.Vector3 point ) : System.Vector3
point System.Vector3
return System.Vector3
        public Vector3 NearestPointTo( Vector3 point )
        {
            Vector3 result;
                Containment containment = Intersect(ref point);
                if(containment != Containment.Disjoint)
                    result = point;
                else
                    point.Clamp(ref Min, ref Max, out result);
                return result;
        }

Same methods

Box3::NearestPointTo ( System.Vector3 &point, System.Vector3 &result ) : void