Expand description
This module contains a struct, Coord
, that models a 3D coordinate space
and supports limited math in 3 dimensions with scalars and other
coordinates. Used to unify math with colors that is the same, just with
different projections into 3D space.
Structs
- A point in 3D space. Supports many common arithmetic operations on points.
Coord
has three axes, denotedx
,y
, andz
. These are not any different in any method ofCoord
, so the distinction between them is completely conventional. In Scarlet, anyColor
that converts to and from aCoord
will match its components with these axes in the order of the letters in its name: for example,CIELABColor
maps to a coordinate such thatl
is on the x-axis,a
is on the y-axis, andb
is on the z-axis.