Quaternion.X Property


Gets the X component of the quaternion.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public double X { get; set; }

Property Value

Type: System.Double

The X component of the quaternion.

The default value is 0.

//convert to quaternion and update display
    Quaternion tempQuaternion = new Quaternion(axis, angle);
    QuaternionWText.Text = tempQuaternion.W.ToString();
    QuaternionXText.Text = tempQuaternion.X.ToString();
    QuaternionYText.Text = tempQuaternion.Y.ToString();
    QuaternionZText.Text = tempQuaternion.Z.ToString();
    MessageBox.Show("Set non-null values for the axis Vector3D.");

.NET Framework
Available since 3.0
Return to top