Skip to main content

Module vec

Module vec 

Source
Expand description

Vector and point types for geometric computation.

Vector represents directions and displacements; Position represents positions. Both are newtypes over fixed-size f64 arrays, parameterized by dimension via const generics.

Ergonomic type aliases are provided for common dimensions:

AliasUnderlying type
Vec2Vector<2>
Vec3Vector<3>
Point2Position<2>
Point3Position<3>

Structs§

Position
An N-dimensional point representing a position.
Vector
An N-dimensional vector representing a direction or displacement.

Type Aliases§

Point2
A 2D point.
Point3
A 3D point.
Vec2
A 2D vector.
Vec3
A 3D vector.