Module math_adapter::cgmath
source · [−]Expand description
Implement adapters for cgmath
.
Modules
Trait to interpret math data structures of other math libs as their analogs in cgmath to use operations of cgmath.
Constrained conversion functions for assisting in situations where type inference is difficult.
Exposed namespace of the module.
Numeric traits for generic mathematics
Orphan namespace of the module.
Prelude to use essentials: use my_module::prelude::*
.
This module contains the most common traits used in cgmath
. By
glob-importing this module, you can avoid the need to import each trait
individually, while still being selective about what types you import.
Protected namespace of the module.
Implement interfaces for objects of the math library.
Macros
Approximate equality of using the absolute difference.
Approximate inequality of using the absolute difference.
An assertion that delegates to [abs_diff_eq!
], and panics with a helpful error on failure.
An assertion that delegates to [abs_diff_ne!
], and panics with a helpful error on failure.
An assertion that delegates to [relative_eq!
], and panics with a helpful error on failure.
An assertion that delegates to [relative_ne!
], and panics with a helpful error on failure.
An assertion that delegates to [ulps_eq!
], and panics with a helpful error on failure.
An assertion that delegates to [ulps_ne!
], and panics with a helpful error on failure.
Approximate equality using both the absolute difference and relative based comparisons.
Approximate inequality using both the absolute difference and relative based comparisons.
Approximate equality using both the absolute difference and ULPs (Units in Last Place).
Approximate inequality using both the absolute difference and ULPs (Units in Last Place).
Structs
The requisite parameters for testing for approximate equality using a absolute difference based comparison.
A two-dimensional rotation matrix.
A three-dimensional rotation matrix.
A generic transformation consisting of a rotation, displacement vector and scale amount.
An angle, in degrees.
A set of Euler angles representing a rotation in three-dimensional space.
A 2 x 2, column major matrix
A 3 x 3, column major matrix
A 4 x 4, column major matrix
An orthographic projection with arbitrary left/right/bottom/top distances
A perspective projection with arbitrary left/right/bottom/top distances
A perspective projection based on a vertical field-of-view angle.
A point in 1-dimensional space.
A point in 2-dimensional space.
A point in 3-dimensional space.
A quaternion in scalar/vector form.
An angle, in radians.
The requisite parameters for testing for approximate equality using a relative based comparison.
The requisite parameters for testing for approximate equality using an ULPs based comparison.
A 1-dimensional vector.
A 2-dimensional vector.
A 3-dimensional vector.
A 4-dimensional vector.
Traits
Equality that is defined using the absolute difference of two numbers.
Angles and their associated trigonometric functions.
An array containing elements of type Element
Trait to interpret canonical math data structures of other math libs as their analogs in cgmath to use operations of cgmath.
Trait for non-canonical structure to clone math data structures of other math libs as their analogs in cgmath to use operations of cgmath.
Base floating point types
Base numeric types with partial ordering
Numbers which have upper and lower bounds
Element-wise arithmetic operations. These are supplied for pragmatic reasons, but will usually fall outside of traditional algebraic properties.
Points in a Euclidean space with an associated space of displacement vectors.
A column-major matrix of arbitrary dimensions.
A type with a distance function between values.
Defines a multiplicative identity element for Self
.
Equality comparisons between two numbers using both the absolute difference and relative based comparisons.
A trait for a generic rotation. A rotation is a transformation that creates a circular motion, and preserves at least one point in the space.
A two-dimensional rotation.
A three-dimensional rotation.
A column-major major matrix where the rows and column vectors are of the same dimensions.
A trait representing an affine transformation that can be applied to points or vectors. An affine transformation is one which
Equality comparisons between two numbers using both the absolute difference and ULPs (Units in Last Place) based comparisons.
Vectors that can be added together and multiplied by scalars.
Defines an additive identity element for Self
.
Functions
Dot product of two vectors.
Create a perspective matrix from a view frustum.
Create an orthographic projection matrix.
Create a perspective projection matrix.
The short constructor.
The short constructor.
The short constructor.
The short constructor.
The short constructor.
The short constructor.
The short constructor.
Type Definitions
X2 Vector of cgmath