Platform SDK: DirectX

DirectX7.VectorModulus

The DirectX7.VectorModulus method returns the magnitude of a vector.

object.VectorModulus(vA As D3DVECTOR) As Single

Parameters

object
Object expression that resolves to a DirectX7 object.
vA
The D3DVECTOR type whose length is returned.

Return Values

If the method succeeds, the length of the D3DVECTOR type is returned, or zero otherwise.

Error Codes

If the method fails, an error is raised and Err.Number is set.

Remarks

This method uses the following formula to calculate the vector magnitude: