Collections6 exports
Raw Markdown/vec
2D, 3D, and 4D Euclidean vector math (Vec2, Vec3, Vec4): dot product, cross product, normalization, and distance.
Structs#
Vec2#
struct2D vector with `#Float` components.
| Field | Type | Default | Constraints / Notes |
|---|---|---|---|
x | Float | — | — |
y | Float | — | — |
Vec3#
struct3D vector with `#Float` components.
| Field | Type | Default | Constraints / Notes |
|---|---|---|---|
x | Float | — | — |
y | Float | — | — |
z | Float | — | — |
Vec4#
struct4D homogeneous vector with `#Float` components.
| Field | Type | Default | Constraints / Notes |
|---|---|---|---|
x | Float | — | — |
y | Float | — | — |
z | Float | — | — |
t | Float | — | — |
Traits#
Vec#
traitAlgebraic vector trait for N-dimensional `#Float` Structs. Automatically implemented via `(derive T Vec)`.
| Method | Signature | Description |
|---|---|---|
+ | | — |
- | | — |
* | | — |
/ | | — |
cmul | | — |
dot | | — |
length-squared-of | | — |
length-of | | — |
normalize | | — |
distance-of | | — |
lerp | | — |
is-near-zero? | | — |
to-array | | — |