Rotate all points counterclockwise around a pivot point by given angle (in radians), without modifying the input points array
Array of points to rotate
angle in radians
pivot point
rotated points
const points = [[1, 0], [1, 1]];const origin = [0, 0];geomRotate(points, Math.PI, origin); // returns [[-1, 0], [-1, -1]] Copy
const points = [[1, 0], [1, 1]];const origin = [0, 0];geomRotate(points, Math.PI, origin); // returns [[-1, 0], [-1, -1]]
Rotate all points counterclockwise around a pivot point by given angle (in radians), without modifying the input points array