﻿Quaternion Properties

# Quaternion Properties

The Quaternion type exposes the following members.

Properties
NameDescription
A
Gets or sets the real part of the quaternion.
B
Gets or sets the first imaginary coefficient of the quaternion.
C
Gets or sets the second imaginary coefficient of the quaternion.
Conjugate
Gets a new quaternion that is the conjugate of this quaternion.

This is (a,-b,-c,-d)

D
Gets or sets the third imaginary coefficient of the quaternion.
I
Returns the (0,1,0,0) quaternion.
Identity
Returns the (1,0,0,0) quaternion.
Inverse
Computes a new inverted quaternion,

(a/L2, -b/L2, -c/L2, -d/L2),

where L2 = length squared = (a*a + b*b + c*c + d*d).

This is the multiplicative inverse, i.e., (a,b,c,d)*(a/L2, -b/L2, -c/L2, -d/L2) = (1,0,0,0). If this is the zero quaternion, then the zero quaternion is returned.
IsScalar
true if b, c, and d are all zero.
IsValid
Determines if the four coefficients are valid numbers within RhinoCommon.
IsVector
true if a = 0 and at least one of b, c, or d is not zero.
IsZero
true if a, b, c, and d are all zero.
J
Returns the (0,0,1,0) quaternion.
K
Returns the (0,0,0,1) quaternion.
Length
Returns the length or norm of the quaternion.
LengthSquared
Gets the result of (a^2 + b^2 + c^2 + d^2).
Scalar
The real (scalar) part of the quaternion

This is A.

Vector
The imaginary part of the quaternion

(B,C,D)

Zero
Returns the default quaternion, where all coefficients are 0.
Top