Documentation

Unity Engine

Download Unity

Unity Engine

Quaternion4Extensions

Extension methods for the quaternion4 type. Every operation is applied per lane.
Read time 1 minuteLast updated 3 hours ago

Definition

public static class Quaternion4Extensions

Static Methods

Method

Description

AddReturns q1 + q2 with q2 flipped into the hemisphere of q1. The result isn't normalized, so it can be used to accumulate weighted rotations.
ConjugateReturns the conjugate of the quaternion4.
DotReturns the dot product of two quaternion4 values.
HashComputes a single hash code that combines all four quaternions of the quaternion4.
HashWideComputes a separate hash code for each of the four quaternions of the quaternion4.
MulComputes the quaternion product of
lhs
and
rhs
.
NlerpComputes the normalized linear interpolation from
q1
to
q2
along the shortest path.
NormalizeReturns the normalized quaternion4.
NormalizeSafeReturns the normalized quaternion4, or the identity for the lanes whose squared length isn't greater than FLT_MIN_NORMAL.
QuatWeightWeights each rotation of the quaternion4 toward the identity rotation, for additive blending.
SelectSelects, for each lane,
b
where
c
is
true
and
a
otherwise.
ToFloat4x4Returns a float4x4 whose columns are the x, y, z and w planes of the quaternion4.