Click or drag to resize
DigitalRuneDefinitions and Conventions

This section explains basic usage information and conventions used in DigitalRune Mathematics.

Tip Tip

More general information about math conventions can be found in the following article: 3D Math Conventions

Coordinate system

The standard right-handed coordinate system is used.

Vector notation and matrix multiplications

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.)

Comparing floating-point values

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.

Naming conventions

Single- and double-precision floating-point types

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.

Units