Returns a line that is rotated by angleRad. By default it rotates
around its center, but an arbitrary origin point can be provided.
If origin is a number, it's presumed to be a 0..1 percentage of the line.
// Rotates line by 0.1 radians around point 10,10 constr = Lines.rotate(line, 0.1, {x:10,y:10});
// Rotate line by 5 degrees around its center constr = Lines.rotate(line, degreeToRadian(5));
// Rotate line by 5 degres around its end point constr = Lines.rotate(line, degreeToRadian(5), line.b);
// Rotate by 90 degrees at the 80% position constr = Lines.rotated = rotate(line, Math.PI / 2, 0.8);
Returns a line that is rotated by
angleRad
. By default it rotates around its center, but an arbitraryorigin
point can be provided. Iforigin
is a number, it's presumed to be a 0..1 percentage of the line.