Пример #1
0
        /// <summary>
        /// Multiply the rects size equally with a single float and get the copy.
        /// </summary>
        public static Rect Size(this HUMMath.Data.MultiplyRect A, float B)
        {
            var result = A.rect;

            result.width  *= B;
            result.height *= B;
            return(result);
        }
Пример #2
0
        /// <summary>
        /// Multiply the rects size and get the copy.
        /// </summary>
        public static Rect Size(this HUMMath.Data.MultiplyRect A, Vector2 B)
        {
            var result = A.rect;

            result.width  *= B.x;
            result.height *= B.y;
            return(result);
        }
Пример #3
0
        /// <summary>
        /// Multiply the rects position equally with a single float and get the copy.
        /// </summary>
        public static Rect Position(this HUMMath.Data.MultiplyRect A, float B)
        {
            var result = A.rect;

            result.x *= B;
            result.y *= B;
            return(result);
        }
Пример #4
0
        /// <summary>
        /// Multiply the rects position and get the copy.
        /// </summary>
        public static Rect Position(this HUMMath.Data.MultiplyRect A, Vector2 B)
        {
            var result = A.rect;

            result.x *= B.x;
            result.y *= B.y;
            return(result);
        }
Пример #5
0
 /// <summary>
 /// Multiply the height of this rect.
 /// </summary>
 public static Rect Height(this HUMMath.Data.MultiplyRect multiply, float value)
 {
     return(multiply.rect.Multiply(new Rect(0, 0, 0, value)));
 }
Пример #6
0
 /// <summary>
 /// Mutiply the X axis position of this rect.
 /// </summary>
 public static Rect X(this HUMMath.Data.MultiplyRect multiply, float value)
 {
     return(multiply.rect.Multiply(new Rect(value, 0, 0, 0)));
 }