Nez.Portable/UI/Base/Element.cs
/// <summary>
/// returns the distance from point to the bounds of element in the largest dimension or a negative number if the point is inside the bounds.
/// Note that point should be in the element's coordinate system already.
/// </summary>
/// <returns>The outside bounds to point.</returns>
/// <param name="Point">Point.</param>
returns the distance from point to the bounds of element in the largest dimension or a negative number if the point is inside the bounds.
Note that point should be in the element's coordinate system already.
returns the distance from point to the bounds of element in the largest dimension or a negative number if the point is inside the bounds . Note that point should be in the element ' s coordinate system already .
protected float distanceOutsideBoundsToPoint(Vector2 point)
        {
            var offsetX = Math.Max(-point.X, point.X - width);
            var offsetY = Math.Max(-point.Y, point.Y - height);
            return Math.Max(offsetX, offsetY);
        }
protected float distanceOutsideBoundsToPoint ( Vector2 point ) { var offsetX = Math . Max ( - point . X , point . X - width ) ; var offsetY = Math . Max ( - point . Y , point . Y - height ) ; return Math . Max ( offsetX , offsetY ) ; }
returns the distance from point to the bounds of element in the largest dimension or a negative number if the point is inside the bounds.
returns the distance from point to the bounds of element in the largest dimension or a negative number if the point is inside the bounds .
The outside bounds to point.
The outside bounds to point .
point
Vector2
Point
None