<PackageReference Include="System.Numerics.Vectors" Version="4.5.0-preview2-26406-04" />

System.Numerics.Quaternion

public struct Quaternion : IEquatable<Quaternion>
Represents a vector that is used to encode three-dimensional physical rotations.
public float W

The rotation component of the quaternion.

public float X

The X value of the vector component of the quaternion.

public float Y

The Y value of the vector component of the quaternion.

public float Z

The Z value of the vector component of the quaternion.

public static Quaternion Identity { get; }

Gets a quaternion that represents no rotation.

public bool IsIdentity { get; }

Gets a value that indicates whether the current instance is the identity quaternion.

public Quaternion(float x, float y, float z, float w)

Constructs a quaternion from the specified components.

public Quaternion(Vector3 vectorPart, float scalarPart)

Creates a quaternion from the specified vector and rotation parts.

public static Quaternion Add(Quaternion value1, Quaternion value2)

Adds each element in one quaternion with its corresponding element in a second quaternion.

public static Quaternion Concatenate(Quaternion value1, Quaternion value2)

Concatenates two quaternions.

public static Quaternion Conjugate(Quaternion value)

Returns the conjugate of a specified quaternion.

public static Quaternion CreateFromAxisAngle(Vector3 axis, float angle)

Creates a quaternion from a vector and an angle to rotate about the vector.

Creates a quaternion from the specified rotation matrix.

public static Quaternion CreateFromYawPitchRoll(float yaw, float pitch, float roll)

Creates a new quaternion from the given yaw, pitch, and roll.

public static Quaternion Divide(Quaternion value1, Quaternion value2)

Divides one quaternion by a second quaternion.

public static float Dot(Quaternion quaternion1, Quaternion quaternion2)

Calculates the dot product of two quaternions.

public static Quaternion Inverse(Quaternion value)

Returns the inverse of a quaternion.

public static Quaternion Lerp(Quaternion quaternion1, Quaternion quaternion2, float amount)

Performs a linear interpolation between two quaternions based on a value that specifies the weighting of the second quaternion.

public static Quaternion Multiply(Quaternion value1, Quaternion value2)

Returns the quaternion that results from multiplying two quaternions together.

public static Quaternion Multiply(Quaternion value1, float value2)

Returns the quaternion that results from scaling all the components of a specified quaternion by a scalar factor.

public static Quaternion Negate(Quaternion value)

Reverses the sign of each component of the quaternion.

public static Quaternion Normalize(Quaternion value)

Divides each component of a specified Quaternion by its length.

public static Quaternion op_Addition(Quaternion value1, Quaternion value2)

Adds each element in one quaternion with its corresponding element in a second quaternion.

public static Quaternion op_Division(Quaternion value1, Quaternion value2)

Divides one quaternion by a second quaternion.

public static bool op_Equality(Quaternion value1, Quaternion value2)

Returns a value that indicates whether two quaternions are equal.

public static bool op_Inequality(Quaternion value1, Quaternion value2)

Returns a value that indicates whether two quaternions are not equal.

public static Quaternion op_Multiply(Quaternion value1, Quaternion value2)

Returns the quaternion that results from multiplying two quaternions together.

public static Quaternion op_Multiply(Quaternion value1, float value2)

Returns the quaternion that results from scaling all the components of a specified quaternion by a scalar factor.

public static Quaternion op_Subtraction(Quaternion value1, Quaternion value2)

Subtracts each element in a second quaternion from its corresponding element in a first quaternion.

public static Quaternion op_UnaryNegation(Quaternion value)

Reverses the sign of each component of the quaternion.

public static Quaternion Slerp(Quaternion quaternion1, Quaternion quaternion2, float amount)

Interpolates between two quaternions, using spherical linear interpolation.

public static Quaternion Subtract(Quaternion value1, Quaternion value2)

Subtracts each element in a second quaternion from its corresponding element in a first quaternion.

public bool Equals(Quaternion other)

Returns a value that indicates whether this instance and another quaternion are equal.

public float Length()

Calculates the length of the quaternion.

public float LengthSquared()

Calculates the squared length of the quaternion.