Microsoft DirectX 9.0 SDK Update (October 2004)

UnsafeNativeMethods.Quaternion.Ln Method

Language:

Note: This documentation is preliminary and is subject to change.

Calculates the natural logarithm.

Note: For programming in Microsoft® Visual Basic® .NET or Microsoft® JScript® .NET, use the equivalent method in the Microsoft.DirectX structures.

Definition

Visual Basic .NET Public Shared Function Ln( _
    ByVal pOut As Quaternion, _
    ByVal pQuat As Quaternion _
) As Quaternion
C# public static Quaternion Ln(
    Quaternion pOut,
    Quaternion pQuat
);
Managed C++ public: static Quaternion Ln(
    Quaternion pOut,
    Quaternion pQuat
);
JScript .NET public static function Ln(
    pOut : Quaternion,
    pQuat : Quaternion
) : Quaternion;

Parameters

pOut Microsoft.DirectX.Quaternion. A Quaternion structure that is the natural logarithm of the quaternion passed into the pQuat parameter.
pQuat Microsoft.DirectX.Quaternion. Source Quaternion structure.

Return Value

Microsoft.DirectX.Quaternion . A Quaternion structure that is the natural logarithm of the quaternion passed into the pQuat parameter.

Remarks

The Ln method works only for unit quaternions.

A unit quaternion is defined by the following example.

Q == (cos(theta), sin(theta) * v) where |v| = 1
The natural logarithm of Q is ln(Q) = (0, theta * v)

The return value for this method is the same value returned in the pOut parameter. Resultantly, the Ln method can be used as a parameter for another method.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center