Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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);
        }
Esempio 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)));
 }
Esempio 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)));
 }