Platform SDK: DirectX |
The DirectX7.VectorModulus method returns the magnitude of a vector.
object.VectorModulus(vA As D3DVECTOR) As Single
If the method succeeds, the length of the D3DVECTOR type is returned, or zero otherwise.
If the method fails, an error is raised and Err.Number is set.
This method uses the following formula to calculate the vector magnitude: