The following are general purpose math processing routines. Ni_Vector_Add() Add two Nd_Vector datatypes together. Ni_Vector_Direction() Compute direction vector & length from two points. Ni_Vector_Normalize() Normalize a Nd_Vector datatype. Ni_Vector_Reflect() Reflect a Nd_Vector datatype about the origin. Ni_Vector_Scale() Scale a Nd_Vector datatype. Ni_Vector_Subtract() Subtract two Nd_Vector datatypes. Ni_Vector_Transform() Transform Nd_Vector datatypes by a 4x4 matrix. Ni_Vector_Zero() Zero out a Nd_Vector datatype. Ni_Compute_Cross_Product() Compute the cross product of two Nd_Vector datatypes. Ni_Compute_Normal() Compute the normal from a polygon's vertices. Ni_Compute_Polygon_Area() Compute the polygon area from a polygon's vertices. Ni_Compute_Power() Compute the pow() expression, with checks for underflow. Ni_Matrix_Adjoint() Calculate the adjoint and determinant of a matrix. Ni_Matrix_Append_Transform() Append a linear transformation to an existing matrix. Ni_Matrix_Copy() Copy a matrix. Ni_Matrix_Create_Axis_Rotation() Create a 3D rotation matrix relative to an axis. Ni_Matrix_Decompose() Decompose a matrix into translate, scale, shear & rotates. Ni_Matrix_Identity() Create an identity matrix for the Nd_Matrix datatype. Ni_Matrix_Invert() Calculate the inverse of a matrix. Ni_Matrix_Multiply() Multiply two matrices together. Ni_Matrix_Transpose() Transpose a matrix. Ni_Inquire_Mapping() Map from one coordinate system to another.
The following are general purpose math processing routines.