Exemplo n.º 1
0
        /// <summary>
        /// Subtract from a rects size equally with a single float and get the copy.
        /// </summary>
        public static Rect Size(this HUMMath.Data.SubtractRect A, float B)
        {
            var result = A.rect;

            result.width  -= B;
            result.height -= B;
            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Subtract from a rects size and get the copy.
        /// </summary>
        public static Rect Size(this HUMMath.Data.SubtractRect A, Vector2 B)
        {
            var result = A.rect;

            result.width  -= B.x;
            result.height -= B.y;
            return(result);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Subtract from a rects position equally with a single float and get the copy.
        /// </summary>
        public static Rect Position(this HUMMath.Data.SubtractRect A, float B)
        {
            var result = A.rect;

            result.x -= B;
            result.y -= B;
            return(result);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Subtract from a rects position and get the copy.
        /// </summary>
        public static Rect Position(this HUMMath.Data.SubtractRect A, Vector2 B)
        {
            var result = A.rect;

            result.x -= B.x;
            result.y -= B.y;
            return(result);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Subtract from the rects height.
 /// </summary>
 public static Rect Height(this HUMMath.Data.SubtractRect subtract, float value)
 {
     return(subtract.rect.Subtract(new Rect(0, 0, 0, value)));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Subtract from X of this rect.
 /// </summary>
 public static Rect X(this HUMMath.Data.SubtractRect subtract, float value)
 {
     return(subtract.rect.Subtract(new Rect(value, 0, 0, 0)));
 }