Contains general 3D Math functionality. This provides a number of classes
for manipulating vectors, matrices and colors plus some general functions on
RS.Math
.
Note that all classes and functions on RS.Math
are also available directly
on RS
. This is to make acessing the classes easier when exposed as ES6 modules.
Example
import { Vector4, radians } from '@migenius/realityserver-client';
// as opposed to
import { Math as RSMath } from '@migenius/realityserver-client';
const { Vector4, radians } = RSMath;
Classes
Members
-
A number that is very close to zero.
Methods
-
Converts a value from radians to degrees.
Name Type Description radians
Number the value in radians.
Returns:
Type Description Number the value in degrees. -
Converts a value from degrees to radians.
Name Type Description degrees
Number the value in degrees.
Returns:
Type Description Number the value in radians.