Show / Hide Table of Contents

Class QuaternionExtensions

Provides extension methods for the Quaternion struct.

Inheritance
System.Object
QuaternionExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AssetRipper.Numerics
Assembly: AssetRipper.Numerics.dll
Syntax
public static class QuaternionExtensions

Methods

| Improve this Doc View Source

Dot(Quaternion, Quaternion)

Returns the dot product of two Quaternions.

Declaration
public static double Dot(this Quaternion a, Quaternion b)
Parameters
Type Name Description
Quaternion a

The first Quaternion.

Quaternion b

The second Quaternion.

Returns
Type Description
System.Double

The dot product of two Quaternions.

| Improve this Doc View Source

EqualsByDot(Quaternion, Quaternion)

Returns a value indicating if this Quaternion is nearly equal to another using dot product.

Declaration
public static bool EqualsByDot(this Quaternion a, Quaternion b)
Parameters
Type Name Description
Quaternion a

The first Quaternion.

Quaternion b

The second Quaternion.

Returns
Type Description
System.Boolean

True if they are nearly equal.

| Improve this Doc View Source

FlipSignAt(ref Quaternion, Int32)

Flips the sign of the value of the specified index of the Quaternion.

Declaration
public static void FlipSignAt(this ref Quaternion quaternion, int index)
Parameters
Type Name Description
Quaternion quaternion

The Quaternion instance.

System.Int32 index

The index of the Quaternion.

| Improve this Doc View Source

GetAt(Quaternion, Int32)

Returns the value of the specified index of the Quaternion.

Declaration
public static float GetAt(this Quaternion quaternion, int index)
Parameters
Type Name Description
Quaternion quaternion

The Quaternion instance.

System.Int32 index

The index of the Quaternion.

Returns
Type Description
System.Single

The value of the specified index of the Quaternion.

| Improve this Doc View Source

IsUnitQuaternion(Quaternion)

Returns a value indicating if this Quaternion is an unit quaternion.

Declaration
public static bool IsUnitQuaternion(this Quaternion a)
Parameters
Type Name Description
Quaternion a

The Quaternion instance.

Returns
Type Description
System.Boolean

True if this Quaternion is an unit quaternion.

| Improve this Doc View Source

IsZero(Quaternion)

Returns a value indicating if this Quaternion is the zero Quaternion.

Declaration
public static bool IsZero(this Quaternion a)
Parameters
Type Name Description
Quaternion a

The Quaternion instance.

Returns
Type Description
System.Boolean

True if this Quaternion is the zero Quaternion.

| Improve this Doc View Source

SetAt(ref Quaternion, Int32, Single)

Sets the value of the specified index of the Quaternion.

Declaration
public static void SetAt(this ref Quaternion quaternion, int index, float value)
Parameters
Type Name Description
Quaternion quaternion

The Quaternion instance.

System.Int32 index

The index of the Quaternion.

System.Single value

The value to be set.

| Improve this Doc View Source

ToEulerAngle(Quaternion, Boolean)

Converts a quaternion to Euler angles.

Declaration
public static Vector3 ToEulerAngle(this Quaternion quaternion, bool asDegrees)
Parameters
Type Name Description
Quaternion quaternion

The Quaternion instance.

System.Boolean asDegrees

If true, the Euler angles will be in degrees. If false, radians are used.

Returns
Type Description
Vector3

A Vector3 containing the Euler angles of the Quaternion.

  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾