Expand description
Two-dimensional affine transformations.
An Affine stores the six effective coefficients of the augmented
matrix below. The final row is fixed and cannot be put into an invalid
state.
| a b c |
| d e f |
| 0 0 1 |§Example
use affine_rs::Affine;
let transform = Affine::translation(10.0, 20.0)
.compose(Affine::scale(2.0, 2.0));
assert_eq!(transform.transform_point([3.0, 4.0]), [16.0, 28.0]);Structs§
- Affine
- A two-dimensional affine transform.
Enums§
- Affine
Error - Errors produced by affine operations.
Constants§
- DEFAULT_
EPSILON - Default tolerance for approximate comparisons.