Expand description
Math types and traits
Re-exports§
pub use vek::approx;
pub use vek::num_traits;
pub use vek;
Modules§
- coordinate
- Tagged coordinate types
- geometry
- Geometry utilities
Macros§
Structs§
- Affine2
- 2D affine space
- Affine3
- 3D affine space
- Affine4
- 4D affine space
- Affine
Map - Homomorphism of an affine spaces: a combination of a linear map and a translation
- Affinity
- Affine isomorphism
- Angle
Wrapped - Unsigned wrapped angle restricted to $[0, 2\pi)$
- Angle
Wrapped Signed - Signed wrapped angle restricted to $(-\pi, \pi]$
- Angles3
- (Euler angles) representation of a 3D orientation. Internally the angles are wrapped to $[0, 2\pi)$.
- Deg
- Degrees
- Euclidean2
- 2D euclidean space
- Euclidean3
- 3D euclidean space
- Euclidean4
- 4D euclidean space
- Linear
Auto - Invertible linear endomorphism
- Linear
Iso - Invertible linear map
- Matrix2
- 2x2 matrix.
- Matrix3
- 3x3 matrix.
- Matrix4
- 4x4 matrix.
- NonNegative
- Non-negative scalars (may be zero)
- NonZero
- Non-zero scalars
- NonZero2
- 2D non-zero vector
- NonZero3
- 3D non-zero vector
- NonZero4
- 4D non-zero vector
- Normal
Signed - Scalars in the closed interval [-1, 1]
- Normalized
- Scalars in the closed unit interval [0, 1]
- Point2
- 2D position
- Point3
- 3D position
- Point4
- 4D position
- Pose3
- Representation of a 3D position + orientation
- Positive
- Strictly positive scalars (non-zero)
- Projectivity
- Isomorphism of projective spaces (a.k.a. homography or projective collineation)
- Quaternion
- Quaternions are a convenient representation for rotations in 3D spaces.
- Rad
- Radians
- Rotation2
- Orthogonal 2x2 matrix with determinant +1, i.e. a member of the circle group $SO(2)$ of special orthogonal matrices
- Rotation3
- Orthogonal 3x3 matrix with determinant +1, i.e. a member of the 3D rotation group $SO(3)$ of special orthogonal matrices
- Turn
- Turns
- Unit2
- 2D unit vector
- Unit3
- 3D unit vector
- Unit4
- 4D unit vector
- Vector2
- Vector type suited for 2D spatial coordinates.
- Vector3
- Vector type suited for 3D spatial coordinates.
- Vector4
- Vector type suited for homogeneous 3D spatial coordinates.
- Versor
- Unit quaternion representing an orientation in $\mathbb{R}^3$
Enums§
- Axis2
- X or Y axis
- Axis3
- X, Y, or Z axis
- Axis4
- X, Y, Z, or W axis
- Octant
- 3D octant
- Quadrant
- 2D quadrant
- Sign
- Negative, zero, or positive
- Signed
Axis1 - Positive or negative X axis
- Signed
Axis2 - Positive or negative X or Y axis
- Signed
Axis3 - Positive or negative X, Y, or Z axis
- Signed
Axis4 - Positive or negative X, Y, Z, or W axis
Constants§
Traits§
- Additive
Group - Interface for a group with identity represented by
zero
, and operation defined by+
and-
- Additive
Monoid - Set with identity represented by
zero
and (associative) binary operation defined by+
- Affine
Space - Space of
Point
andVector
(translations) - Angle
- Interface for angle units
- Dot
- Scalar product (bilinear form) on a
Module
- Euclidean
Space AffineSpace
with translations in a (Euclidean) real inner product space- Exp
- Exponential function
- Field
- A (commutative)
Ring
where $1 \neq 0$ and all non-zero elements are invertible - Fixed
Matrix2 - Convert to fixed precision 2x2 matrix
- Fixed
Matrix3 - Convert to fixed precision 3x3 matrix
- Fixed
Matrix4 - Convert to fixed precision 4x4 matrix
- Fixed
Point2 - Convert to fixed precision 2D point
- Fixed
Point3 - Convert to fixed precision 3D point
- Fixed
Point4 - Convert to fixed precision 4D point
- Fixed
Vector2 - Convert to fixed precision 2D vector
- Fixed
Vector3 - Convert to fixed precision 3D vector
- Fixed
Vector4 - Convert to fixed precision 4D vector
- Group
- Set with identity, inverses, and (associative) binary operation
- Group
Action - (Right) action of a group on a set
- Inner
Product Space - Bilinear form on a
VectorSpace
- Integer
- Ring of integers
- Linear
Map - Module homomorphism
- Maybe
SerDes - Adds serde Serialize and DeserializeOwned constraints.
- Metric
Space - Set of points with distance function
- MinMax
- Provides
min
,max
, andclamp
that are not necessarily consistent with those fromOrd
. This is provided becausef32
andf64
do not implementOrd
, so this trait is defined to give a uniform interface withOrd
types. - Module
- Additive group combined with scalar multiplication
- Multiplicative
Group - Interface for a group with identity represented by
one
, operation defined by*
and/
- Multiplicative
Monoid - Set with identity represented by
one
and (associative) binary operation defined by*
- Normed
Vector Space VectorSpace
with vector length/magnitude function- Point
- Point types convertible to and from a vector type, with difference function that follows from the free and transitive group action
- Projective
Space - Projective completion (homogeneous coordinates)
- Real
Field
with special functions and partial ordering- Ring
- Interface for a (partially ordered) ring as a combination of an additive group and a distributive multiplication operation
- Signed
Ext - Function returning number representing sign of self
- Sqrt
- Square root function
- Trig
- Trigonometric functions
- Vector
Space - Module with scalars taken from a
Field
Functions§
- report_
sizes - Print the sizes of some types