Expand description
3-D vector helpers.
Functions§
- add
a + b.- cross
a × b.- distance
- Euclidean distance
|a - b|. - dot
a · b.- from_xy
- Lift a 2-D vector into 3-D with the given Z component.
- lerp
- Linear interpolation
a + t * (b - a). - norm
|a|.- norm_
squared |a|².- normalize
- Unit vector or
[0, 0, 0]if|a|is below machine epsilon. - scale
a * s.- sub
a - b.- xy
- Project
vonto the horizontal XY plane (drop Z).
Type Aliases§
- Vec3
- 3-D vector in metres.