Skip to main content

Module point

Module point 

Source
Expand description

Positions in 2D and 3D.

A point is affected by translation; a Vector is not. Keeping them distinct types means the compiler rejects the classic errors (translating a normal, adding two positions) rather than letting them produce plausible nonsense.

The algebra that results is the affine one: point − point is a vector, point

  • vector is a point, and point + point is not defined.

Structs§

Point
A position in space.
Point2
A position in the plane.