Glare.Box4f.NearestPointTo C# (CSharp) Method

NearestPointTo() public method

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

Box4f::NearestPointTo ( Vector4f &point, Vector4f &result ) : void