Skip to content

editor / turnAbout

Function: turnAbout() ​

turnAbout(point, center, direction): Point

Defined in: geometry/turn-about.ts:17

Point turned about a center by the angle of a direction.

Formula: c + R(p − c), R(x, y) = (x cos α − y sin α, x sin α + y cos α): SVG's rotate(α, cx, cy), translate, rotate, translate back. In the SVG frame (y down) a positive angle is clockwise on screen.

Parameters ​

point ​

Point

any point of the plane

center ​

Point

the point that stays where it is

direction ​

Vector

(cos α, sin α) of the angle (turnDirection)

Returns ​

Point

the turned point

Kind ​

geometry

See ​

REF-SVG11-TRANSFORM