Namespaces

Types

Type Quaternion

Namespace MathNet.Numerics

Parent ValueType

Interfaces IComparable, ICloneable

Methods

Properties

Public instance methods

Quaternion Add(Quaternion q)

Add a quaternion to this quaternion.
Parameters
return Quaternion
Quaternion q

Quaternion Add(double r)

Add a floating point number to this quaternion.
Parameters
return Quaternion
double r

object Clone()

Creates a copy of this quaternion.
Parameters
return object

int CompareTo(object obj)

Compares this quaternion with another quaternion.
Parameters
return int
object obj

Quaternion Conjugate()

Conjugate this quaternion.
Parameters
return Quaternion

Quaternion Divide(double d)

Multiplies a Quaterion with the inverse of a real number.
Its also Possible to cast a double to a Quaternion and make the division afterwards. But this is less performant.
Parameters
return Quaternion
double d

Quaternion Divide(Quaternion q)

Multiplies a Quaternion with the inverse of another Quaternion (q*q). Note that for Quaternions q*q is not the same then q*q, because this will lead to a rotation in the other direction.
Parameters
return Quaternion
Quaternion q

bool Equals(object obj)

Parameters
return bool
object obj

Quaternion Exp()

Exponential Function.
Parameters
return Quaternion

int GetHashCode()

Parameters
return int

Type GetType()

Parameters
return Type

Quaternion Inverse()

Inverts this quaternion.
Parameters
return Quaternion

Quaternion Lg()

Common Logarithm to base 10.
Parameters
return Quaternion

Quaternion Ln()

Natural Logrithm to base E.
Parameters
return Quaternion

Quaternion Log(double lbase)

Logarithm to a given base.
Parameters
return Quaternion
double lbase

Quaternion Multiply(double d)

Multiply a floating point number to this quaternion.
Parameters
return Quaternion
double d

Quaternion Multiply(Quaternion q)

Multiply a quaternion with this quaternion.
Parameters
return Quaternion
Quaternion q

Quaternion Negate()

Negate this quaternion.
Parameters
return Quaternion

Quaternion Pow(Quaternion power)

Raise the quaternion to a given power.
Parameters
return Quaternion
Quaternion power

Quaternion Pow(double power)

Raise the quaternion to a given power.
Parameters
return Quaternion
double power

Quaternion Scalar()

Returns a new Quaternion q with the Scalar part only. If you need a Double, use the Real-Field instead.
Parameters
return Quaternion

Quaternion Sign()

Returns a new normalized Quaternion q with the direction of this quaternion.
Parameters
return Quaternion

Quaternion Sqr()

Square of the Quaternion q: q^2.
Parameters
return Quaternion

Quaternion Sqrt()

Square root of the Quaternion: q^(1/2).
Parameters
return Quaternion

Quaternion Subtract(double r)

Subtract a floating point number from this quaternion.
Parameters
return Quaternion
double r

Quaternion Subtract(Quaternion q)

SUbtract a quaternion from this quaternion.
Parameters
return Quaternion
Quaternion q

string ToString()

Parameters
return string

Quaternion UnitVector()

Returns a new normalized Quaternion u with the Vectorpart only, such that ||u|| = 1. Q may then be represented as q = r*(cos(phi) + u * sin(phi)) = r*exp(phi*u) where r is the absolute and phi the argument of q.
Parameters
return Quaternion

Quaternion Vector()

Returns a new Quaternion q with the Vectorpart only.
Parameters
return Quaternion

Public static methods

double Distance(Quaternion a, Quaternion b)

Returns the distance |a-b| of two quaternions, forming a metric space.
Parameters
return double
Quaternion a
Quaternion b

Public properties

double Abs get;

G ets the standard euclidean length |q| = sqrt(||q||) of the quaternion q: the square root of the sum of the squares of the four components. Q may then be represented as q = r*(cos(phi) + u * sin(phi)) = r*exp(phi*u) where u is the unit vector and phi the argument of q.
return double

double Arg get;

Gets the argument phi = arg(q) of the quaternion q, such that q = r*(cos(phi) + u * sin(phi)) = r*exp(phi*u) where r is the absolute and u the unit vector of q.
return double

double ImagX get;

Gets the imaginary X part (coefficient of complex I) of the quaternion.
return double

double ImagY get;

Gets the imaginary Y part (coefficient of complex J) of the quaternion.
return double

double ImagZ get;

Gets the imaginary Z part (coefficient of complex K) of the quaternion.
return double

bool IsUnitQuaternion get;

True if the quaternion q is of lenght |q| = 1.
To normalize a quaternion to a length of 1, use the Sign method. All unit quaternions form a 3-sphere.
return bool

double Norm get;

Gets the norm ||q|| = |q|^2 of the quaternion q: the sum of the squares of the four components.
return double

double Real get;

Gets the real part of the quaternion.
return double