/// <summary> /// Divide the rects size equally with a single float and get the copy. /// </summary> public static Rect Size(this HUMMath.Data.DivideRect A, float B) { var result = A.rect; result.width /= B; result.height /= B; return(result); }
/// <summary> /// Divide the rects size and get the copy. /// </summary> public static Rect Size(this HUMMath.Data.DivideRect A, Vector2 B) { var result = A.rect; result.width /= B.x; result.height /= B.y; return(result); }
/// <summary> /// Divide the rects position equally with a single float and get the copy. /// </summary> public static Rect Position(this HUMMath.Data.DivideRect A, float B) { var result = A.rect; result.x /= B; result.y /= B; return(result); }
/// <summary> /// Divide the rects position and get the copy. /// </summary> public static Rect Position(this HUMMath.Data.DivideRect A, Vector2 B) { var result = A.rect; result.x /= B.x; result.y /= B.y; return(result); }
/// <summary> /// Divide the height of this rect. /// </summary> public static Rect Height(this HUMMath.Data.DivideRect divide, float value) { return(divide.rect.Subtract(new Rect(0, 0, 0, value))); }
/// <summary> /// Divide the width of this rect. /// </summary> public static Rect Width(this HUMMath.Data.DivideRect divide, float value) { return(divide.rect.Divide(new Rect(0, 0, value, 0))); }
/// <summary> /// Divide the X position of this rect. /// </summary> public static Rect X(this HUMMath.Data.DivideRect divide, float value) { return(divide.rect.Subtract(new Rect(value, 0, 0, 0))); }