Glare.Box4d.NearestPointTo C# (CSharp) Method

NearestPointTo() public method

Get the nearest point between this Box4d and a Vector4d. If the Vector4d is inside this Box4d, it is returned untouched.
public NearestPointTo ( Vector4d point ) : Vector4d
point Vector4d
return Vector4d
        public Vector4d NearestPointTo( Vector4d point )
        {
            Vector4d 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

Box4d::NearestPointTo ( Vector4d &point, Vector4d &result ) : void