| QuaternionDCreateRotation Method (Vector3D, Double) |
Creates a unit quaternion that specifies a rotation given by axis and angle.
Namespace: DigitalRune.Mathematics.AlgebraAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public static QuaternionD CreateRotation(
Vector3D axis,
double angle
)
Public Shared Function CreateRotation (
axis As Vector3D,
angle As Double
) As QuaternionD
public:
static QuaternionD CreateRotation(
Vector3D axis,
double angle
)
static member CreateRotation :
axis : Vector3D *
angle : float -> QuaternionD
Parameters
- axis
- Type: DigitalRune.Mathematics.AlgebraVector3D
The axis. (Vector does not need to be normalized.) - angle
- Type: SystemDouble
The angle.
Return Value
Type:
QuaternionD
The created unit quaternion that describes a rotation by the
angle radians around the axis.
(axis will be normalized automatically.)
The resulting quaternion is: q = (cos(θ/2), vsin(θ/2))
q = (cos(θ/2), vsin(θ/2))
where
θ is the angle and
v is the normalized axis.
Exceptions See Also