Sums width/height of b with a (ie: a + b), returning result.
x/y of second parameter are ignored
import { Rects } from "@ixfx/geometry.js";
const rectA = { width: 100, height: 100 };
const rectB = { width: 200, height: 200 };
// Yields: { width: 300, height: 300 }
Rects.sum(rectA, rectB);
Sums width/height of b with a, returning result.
Note that width/height of b is also added to a's x & y properties
// Yields: { x:101, y:202, width: 110, height: 220 }
sum({x:1, y:2, width:10, height:20}, {width:100, height: 200});
x & y values of b are ignored. If you want to sum with those, use sumOffset
Sums width/height of rect with width and height
width and height is added to rect's x and y values.
// Yields: { x:101, y:202, width: 110, height: 220 }
sum({x:1, y:2, width:10, height:20}, 100, 200);
Sums width/height of
bwitha(ie: a + b), returning result.Param: a
Param: b
Param: c
Returns