HM_vectormagnitude()

Calculates the magnitude of a vector.

Syntax

int HM_vectormagnitude(HM_vectorpointer vector);

Type

HyperMesh hmlib Function

Description

Calculates the magnitude of a vector.

Inputs

vector
A pointer to a vector.

Example

If successful, the function returns zero; otherwise, nonzero.

This function calculates the magnitude of a vector using the “dist” portion of the vector structure. After the function is called, the “unit” and “magnitude” portion of the vector structure is set to values that represent the unit vector and magnitude of “dist.”

Errors

None.