Quaternion X Property Delta Engine Documentation

Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public float X { get; set; }

Property Value

Type: Single
Remarks

Tests: DeltaEngine.Tests.Datatypes.QuaternionTests
Examples

1 unit tests call DeltaEngine.Datatypes.Quaternion.X
[Test]
public void RotatingUnitXByQuaternionMatchesRotatingItByMatrix()
{
    var quaternion = Quaternion.FromAxisAngle(Vector3D.UnitY, 90.0f);
    var rotatedViaMatrix = Matrix.FromQuaternion(quaternion) * Vector3D.UnitX;
    var rotatedViaQuaternion = quaternion * Vector3D.UnitX;
    Assert.AreEqual(rotatedViaMatrix, rotatedViaQuaternion);
}
See Also