LeapQuaternion¶

struct Leap::LeapQuaternion

The LeapQuaternion struct represents a rotation in three-dimensional space.

Public Functions

bool Equals(LeapQuaternion v)

Compare LeapQuaternion equality component-wise.

bool IsValid()

Returns true if all of the quaternion’s components are finite.

If any component is NaN or infinite, then this returns false.

LeapQuaternion(float x, float y, float z, float w)

Creates a new LeapQuaternion with the specified component values.

LeapQuaternion(LeapQuaternion quaternion)

Copies the specified LeapQuaternion.

LeapQuaternion(LeapInternal.LEAP_QUATERNION quaternion)

Copies the specified LEAP_QUATERNION.

Concatenates the rotation described by this quaternion with the one provided and returns the result.

Return
A LeapQuaternion containging the product.

override string ToString()

Returns a string containing this quaternion in a human readable format: (x, y, z).

Property

float Magnitude

The magnitude, or length, of this quaternion.

Return
The length of this quaternion.

float MagnitudeSquared

The square of the magnitude, or length, of this quaternion.

Return
The square of the length of this quaternion.

LeapQuaternion Normalized

A normalized copy of this quaternion.

Return
A LeapQuaternion object with a length of one.

<!-- <div class="ribbon">

C# and Unity