Sprotty
Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Function.Angle Between Points

sprotty-protocol / angleBetweenPoints

Function: angleBetweenPoints()

angleBetweenPoints(a, b): number

Defined in: utils/geometry.ts:180

Computes the angle in radians between the two given points (relative to the origin of the coordinate system). The result is in the range [0, pi]. Returns NaN if the points are equal.

Parameters

a

Point

First point

b

Point

Second point

Returns

number