You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -436,7 +464,7 @@ where Length: MultiplicativeArithmetic,
436
464
Length:ExpressibleByIntegerLiteral
437
465
{
438
466
439
-
/// Scales this rectangle within the given parent, using the given scaling method
467
+
/// Scales this rectangle within the given parent, using the given scaling method & direction
440
468
///
441
469
/// - Parameters:
442
470
/// - parent: The parent rectangle within which to scale this rectangle
@@ -456,6 +484,27 @@ where Length: MultiplicativeArithmetic,
456
484
}
457
485
458
486
487
+
/// Scales this rectangle by the given multiplier, using the given scaling method & direction
488
+
///
489
+
/// The resulting rectangle's center point is the same as this one's.
490
+
///
491
+
/// The edges are scaled, not the area.
492
+
///
493
+
/// - Parameters:
494
+
/// - multiplier: Scales the outer dimensions of the rectangle by this amount. So a `2x2` rectangle scaled by `0.5` becomes a `1x1` rectangle, or scaled by `3.0` becomes a `6x6` (assuming the direction allows that).
495
+
/// - direction: _optional_ - Which direction to scale this rectangle. Defaults to `.down`
496
+
///
497
+
/// - Returns: A scaled version of this rectangle, relative to the given parent
0 commit comments