Definitions and Conventions |
This section explains basic usage information and conventions used in DigitalRune Mathematics.
Tip |
---|
More general information about math conventions can be found in the following article: 3D Math Conventions |
The standard right-handed coordinate system is used.
The library uses column vectors, which means that transformations are applied in the following order: v' = M2 · M1 · v . (The transformation of matrix M1 is applied before M2.)
This library contains a class Numeric that supports proper comparison of floating-point values. The comparisons are performed by checking if two values differ by less than a tolerance value epsilon. (Note: The class Numeric is part of the DigitalRune.dll not the DigitalRune.Mathematics.dll.)
Several types overload the comparison operators (==, !=, >=, etc. in C#), for example: Vector3F, Matrix44F. These overloaded operations compare the floating-point values directly (without using an epsilon tolerance). In addition to the equality operators most types have methods, like AreNumericallyEqual, that perform comparisons using an epsilon tolerance.
Several types exist in a single-precision version (data type: Single) and a double-precision version (data type: Double). Single-precision types have the postfix F. Double-precision types have the postfix D. For example: Vector3F is a 3-dimensional vector with single-precision. Vector3D is a 3-dimensional vector with double-precision.
The default unit for angle is radian (not degree). Use MathHelperToRadians and MathHelperToDegrees to convert between radians and degrees.