# Quaternion Structure

Defines a four-dimensional vector (x,y,z,w), which is used to efficiently rotate an object about the (x, y, z) vector by the angle theta, where w = cos(theta/2).

**Namespace:**Microsoft.Xna.Framework

**Assembly:**Microsoft.Xna.Framework.Math (in Microsoft.Xna.Framework.Math.dll)

The Quaternion type exposes the following members.

Name | Description | |
---|---|---|

Quaternion(Vector3, Single) | Initializes a new instance of Quaternion. | |

Quaternion(Single, Single, Single, Single) | Initializes a new instance of Quaternion. |

Name | Description | |
---|---|---|

Add(Quaternion, Quaternion) | Adds two Quaternion instances. | |

Add(Quaternion, Quaternion, Quaternion) | Adds two Quaternion instances. | |

Concatenate(Quaternion, Quaternion) | Concatenates two Quaternion instances; the result represents the value1 rotation followed by the value2 rotation. | |

Concatenate(Quaternion, Quaternion, Quaternion) | Concatenates two Quaternion instances; the result represents the value1 rotation followed by the value2 rotation. | |

Conjugate() | Transforms this Quaternion into its conjugate. | |

Conjugate(Quaternion) | Returns the conjugate of a specified Quaternion. | |

Conjugate(Quaternion, Quaternion) | Returns the conjugate of a specified Quaternion. | |

CreateFromAxisAngle(Vector3, Single) | Creates a Quaternion from a vector and an angle to rotate about the vector. | |

CreateFromAxisAngle(Vector3, Single, Quaternion) | Creates a Quaternion from a vector and an angle to rotate about the vector. | |

CreateFromRotationMatrix(Matrix) | Creates a Quaternion from a rotation Matrix. | |

CreateFromRotationMatrix(Matrix, Quaternion) | Creates a Quaternion from a rotation Matrix. | |

CreateFromYawPitchRoll(Single, Single, Single) | Creates a new Quaternion from specified yaw, pitch, and roll angles. | |

CreateFromYawPitchRoll(Single, Single, Single, Quaternion) | Creates a new Quaternion from specified yaw, pitch, and roll angles. | |

Divide(Quaternion, Quaternion) | Divides a Quaternion by another Quaternion. | |

Divide(Quaternion, Quaternion, Quaternion) | Divides a Quaternion by another Quaternion. | |

Dot(Quaternion, Quaternion) | Calculates the dot product of two Quaternion instances. | |

Dot(Quaternion, Quaternion, Single) | Calculates the dot product of two Quaternion instances. | |

Equals(Object) | Returns a value that indicates whether the current instance is equal to a specified object. (Overrides ValueType.Equals(Object).) | |

Equals(Quaternion) | Determines whether the specified Object is equal to the Quaternion. | |

GetHashCode | Get the hash code of this object. (Overrides ValueType.GetHashCode().) | |

Inverse(Quaternion) | Returns the inverse of a Quaternion. | |

Inverse(Quaternion, Quaternion) | Returns the inverse of a Quaternion. | |

Length | Calculates the length of a Quaternion. | |

LengthSquared | Calculates the length squared of a Quaternion. | |

Lerp(Quaternion, Quaternion, Single) | Linearly interpolates between two Quaternion instances. | |

Lerp(Quaternion, Quaternion, Single, Quaternion) | Linearly interpolates between two Quaternion instances. | |

Multiply(Quaternion, Quaternion) | Multiplies two Quaternion instances. | |

Multiply(Quaternion, Single) | Multiplies a Quaternion by a scalar value. | |

Multiply(Quaternion, Quaternion, Quaternion) | Multiplies two Quaternion instances. | |

Multiply(Quaternion, Single, Quaternion) | Multiplies a Quaternion by a scalar value. | |

Negate(Quaternion) | Flips the sign of each component of the Quaternion. | |

Negate(Quaternion, Quaternion) | Flips the sign of each component of the Quaternion. | |

Normalize() | Divides each component of a Quaternion by the length of the Quaternion. | |

Normalize(Quaternion) | Divides each component of a Quaternion by the length of the Quaternion. | |

Normalize(Quaternion, Quaternion) | Divides each component of a Quaternion by the length of the Quaternion. | |

Slerp(Quaternion, Quaternion, Single) | Interpolates between two Quaternion instances, using spherical linear interpolation. | |

Slerp(Quaternion, Quaternion, Single, Quaternion) | Interpolates between two Quaternion instances, using spherical linear interpolation. | |

Subtract(Quaternion, Quaternion) | Subtracts a Quaternion from another Quaternion. | |

Subtract(Quaternion, Quaternion, Quaternion) | Subtracts a Quaternion from another Quaternion. | |

ToString | Retrieves a string representation of the current object. (Overrides ValueType.ToString().) |

Name | Description | |
---|---|---|

Addition | Adds two Quaternion instances. | |

Division | Divides a Quaternion by another Quaternion. | |

Equality | Compares two Quaternion instances for equality. | |

Inequality | Compare two Quaternion instances for inequality. | |

Multiply(Quaternion, Quaternion) | Multiplies two Quaternion instances. | |

Multiply(Quaternion, Single) | Multiplies a Quaternion by a scalar value. | |

Subtraction | Subtracts a Quaternion from another Quaternion. | |

UnaryNegation | Flips the sign of each component of the Quaternion. |

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

## Community Additions

ADD
Show: