Skip to main content

Module affine

Module affine 

Source
Expand description

Affine transforms built from libm, and lengths from sqrt alone, so they are the same bits on every target.

Functions§

distance
The distance between two points, from sqrt alone.
is_invertible
Whether affine can be inverted: a finite, non-zero determinant.
length
The length of vector, from sqrt alone.
max_scale
The largest factor affine stretches a length by: its larger singular value. Zero for a transform that collapses everything.
placement
A group’s transform in pixel space: translate by minus anchor, scale, rotate clockwise, then translate to position.
rotation
A clockwise rotation by degrees in pixel space (y down), about the origin.
rotation_about
A clockwise rotation by degrees about center.