Skip to main content

Home > @jsplumbtoolkit/browser-ui > rotatePoint

rotatePoint() function

Rotate the given point around the given center, by the given rotation (in degrees)

Signature:

export declare function rotatePoint(point: PointXY, center: PointXY, rotation: number): RotatedPointXY;

Parameters

ParameterTypeDescription
pointPointXY
centerPointXY
rotationnumber

Returns:

RotatedPointXY

An object consisting of the rotated point, followed by cos theta and sin theta.