Divides all components of rect
by amount
.
divideScalar({ width:10, height:20 }, 2); // { width:5, height: 10 }
Divides all components of rect
by amount
.
This includes x,y if present.
divideScalar({ width:10, height:20 }, 2); // { width:5, height: 10 }
divideScalar({ x: 1, y: 2, width:10, height:20 }, 2); // { x: 0.5, y: 1, width:5, height: 10 }
Divides all components of
rect
byamount
. This includes x,y if present.Param: rect
Param: amount