| QuaternionFCreateRotation Method (Vector3F, Single) |
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 QuaternionF CreateRotation(
Vector3F axis,
float angle
)
Public Shared Function CreateRotation (
axis As Vector3F,
angle As Single
) As QuaternionF
public:
static QuaternionF CreateRotation(
Vector3F axis,
float angle
)
static member CreateRotation :
axis : Vector3F *
angle : float32 -> QuaternionF
Parameters
- axis
- Type: DigitalRune.Mathematics.AlgebraVector3F
The axis. (Vector does not need to be normalized.) - angle
- Type: SystemSingle
The angle.
Return Value
Type:
QuaternionF
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