linearly v0.32.0Docs


linearly v0.32.0 / mat2d / fromPoints

Function: fromPoints()

fromPoints(first, second, third?): mat2d | null

Creates a matrix that maps from the given points to another. If the third point is not given, the orthogonal matrix is returned.

f-s         f'-s'
|/  ---M--> |/
t           t'

Parameters

first: [vec2, vec2]

a pair of first point

second: [vec2, vec2]

a pair of second point

third?: [vec2, vec2]

a pair of third point

Returns

mat2d | null

Defined in

src/mat2d.ts:525open in new window