Scale all points relative to an origin point, without modifying the input points array
Array of points to scale
scale factor (1 keeps size unchanged)
1
origin point
scaled points
const points = [[1, 0], [2, 0]];const origin = [0, 0];geomScale(points, 2, origin); // returns [[2, 0], [4, 0]] Copy
const points = [[1, 0], [2, 0]];const origin = [0, 0];geomScale(points, 2, origin); // returns [[2, 0], [4, 0]]
Scale all points relative to an origin point, without modifying the input points array