| angle.rs |
|
9997 |
- |
| approxeq.rs |
|
1474 |
- |
| approxord.rs |
Utilities for testing approximate ordering - especially true for
floating point types, where NaN's cannot be ordered. |
1066 |
- |
| box2d.rs |
|
31376 |
- |
| box3d.rs |
|
32307 |
- |
| homogen.rs |
|
6490 |
- |
| length.rs |
A one-dimensional length, tagged with its units. |
16638 |
- |
| lib.rs |
A collection of strongly typed math tools for computer graphics with an inclination
towards 2d graphics and layout.
All types are generic over the scalar type of their component (`f32`, `i32`, etc.),
and tagged with a generic Unit parameter which is useful to prevent mixing
values from different spaces. For example it should not be legal to translate
a screen-space position by a world-space vector and this can be expressed using
the generic Unit parameter.
This unit system is not mandatory and all structures have an alias
with the default unit: `UnknownUnit`.
for example ```default::Point2D<T>``` is equivalent to ```Point2D<T, UnknownUnit>```.
Client code typically creates a set of aliases for each type and doesn't need
to deal with the specifics of typed units further. For example:
```rust
use euclid::*;
pub struct ScreenSpace;
pub type ScreenPoint = Point2D<f32, ScreenSpace>;
pub type ScreenSize = Size2D<f32, ScreenSpace>;
pub struct WorldSpace;
pub type WorldPoint = Point3D<f32, WorldSpace>;
pub type ProjectionMatrix = Transform3D<f32, WorldSpace, ScreenSpace>;
// etc...
```
All euclid types are marked `#[repr(C)]` in order to facilitate exposing them to
foreign function interfaces (provided the underlying scalar type is also `repr(C)`).
|
4685 |
- |
| macros.rs |
|
1081 |
- |
| num.rs |
A one-dimensional length, tagged with its units. |
3882 |
- |
| point.rs |
|
59128 |
- |
| rect.rs |
|
28916 |
- |
| rigid.rs |
All matrix multiplication in this module is in row-vector notation,
i.e. a vector `v` is transformed with `v * T`, and if you want to apply `T1`
before `T2` you use `T1 * T2` |
10952 |
- |
| rotation.rs |
|
32907 |
- |
| scale.rs |
A type-checked scaling factor between units. |
13668 |
- |
| side_offsets.rs |
A group of side offsets, which correspond to top/left/bottom/right for borders, padding,
and margins in CSS. |
13892 |
- |
| size.rs |
|
53005 |
- |
| transform2d.rs |
|
43600 |
- |
| transform3d.rs |
|
55814 |
- |
| translation.rs |
|
31713 |
- |
| trig.rs |
|
2677 |
- |
| vector.rs |
|
75742 |
- |