Function Perform standard vector mathematics.
Syntax
#include <dx/dx.h> Vector DXNeg(Vector v) Vector DXNormalize(Vector v) double DXLength(Vector v) Vector DXAdd(Vector v, Vector w) Vector DXSub(Vector v, Vector w) Vector DXMin(Vector v, Vector w) Vector DXMax(Vector v, Vector w) Vector DXMul(Vector v, double f) Vector DXDiv(Vector v, double f) float DXDot(Vector v, Vector w) Vector DXCross(Vector v, Vector w).
Functional Details
DXNeg, DXNormalize, DXLength | Perform unary operations of negation, normalization, and length. |
DXAdd, DXSub, DXMin, DXMax | Perform vector operations of addition, subtraction, min, and max. Min and max are performed on each component of a vector. |
DXMul, DXDiv | Multiply or divide a vector by a float. |
DXDot, DXCross | Form the dot product or cross-product of two vectors. |
A Point and Vector are defined as follows:
typedef struct point { float x, y, z; } Point, Vector;
Return Value Each routine returns the result of its operation.
See Also DXConcatenate, DXInvert, DXTranspose, DXAdjointTranspose, DXDeterminant, DXApply,
[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]