Internal
Multiplies positioned rect
by width/height. Useful for denormalising a value.
x/y value of second parameter are ignored.
// Normalised rectangle
const r = { x:0.5, y:0.5, width: 0.5, height: 0.5};
// Map to window:
const rr = Rects.multiply(r, window.innerWidth, window.innerHeight);
Multiplication applies to the first parameter's x/y fields.
Optional
height: numberMultiplies rect
by width/height. Useful for denormalising a value.
// Normalised rectangle of width 50%, height 50%
const r = { width: 0.5, height: 0.5 };
// Map to window:
const rr = Rects.multiply(r, window.innerWidth, window.innerHeight);
Multiplication applies to the first parameter's x/y fields, if present.
Multiplies positioned rect a
by width and height of rect b
.
// Returns {width: someRect.width * someOtherRect.width ...}
Rects.multiply(someRect, someOtherRect);
Param: a
Param: b
Param: c
Returns