Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

float3x3

struct in Unity.Mathematics

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

A 3x3 matrix of floats.

Static Properties

Property Description
identityfloat3x3 identity transform.
zerofloat3x3 zero value.

Properties

Property Description
c0Column 0 of the matrix.
c1Column 1 of the matrix.
c2Column 2 of the matrix.
this[int]Returns the float3 element at a specified index.

Constructors

Constructor Description
float3x3Constructs a float3x3 matrix from three float3 vectors.

Public Methods

Method Description
EqualsReturns true if the float3x3 is equal to a given float3x3, false otherwise.
GetHashCodeReturns a hash code for the float3x3.
ToStringReturns a string representation of the float3x3.

Static Methods

Method Description
AxisAngle Returns a float3x3 matrix representing a rotation around a unit axis by an angle in radians. The rotation direction is clockwise when looking along the rotation axis towards the origin.
Euler Returns a float3x3 rotation matrix constructed by first performing 3 rotations around the principal axes in a given order. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. When the rotation order is known at compile time, it is recommended for performance reasons to use specific Euler rotation constructors such as EulerZXY(...).
EulerXYZ Returns a float3x3 rotation matrix constructed by first performing a rotation around the x-axis, then the y-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
EulerXZY Returns a float3x3 rotation matrix constructed by first performing a rotation around the x-axis, then the z-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
EulerYXZ Returns a float3x3 rotation matrix constructed by first performing a rotation around the y-axis, then the x-axis and finally the z-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
EulerYZX Returns a float3x3 rotation matrix constructed by first performing a rotation around the y-axis, then the z-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
EulerZXY Returns a float3x3 rotation matrix constructed by first performing a rotation around the z-axis, then the x-axis and finally the y-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin. This is the default order rotation order in Unity.
EulerZYX Returns a float3x3 rotation matrix constructed by first performing a rotation around the z-axis, then the y-axis and finally the x-axis. All rotation angles are in radians and clockwise when looking along the rotation axis towards the origin.
LookRotation Returns a float3x3 view rotation matrix given a unit length forward vector and a unit length up vector. The two input vectors are assumed to be unit length and not collinear. If these assumptions are not met use float3x3.LookRotationSafe instead.
LookRotationSafe Returns a float3x3 view rotation matrix given a forward vector and an up vector. The two input vectors are not assumed to be unit length. If the magnitude of either of the vectors is so extreme that the calculation cannot be carried out reliably or the vectors are collinear, the identity will be returned instead.
RotateXReturns a float3x3 matrix that rotates around the x-axis by a given number of radians.
RotateYReturns a float3x3 matrix that rotates around the y-axis by a given number of radians.
RotateZReturns a float3x3 matrix that rotates around the z-axis by a given number of radians.
ScaleReturns a float3x3 matrix representing a uniform scaling of all axes by s.

Operators

Operator Description
float3x3Implicitly converts a single float value to a float3x3 matrix by assigning it to every component.
float3x3Explicitly converts a single bool value to a float3x3 matrix by converting it to float and assigning it to every component.
float3x3Explicitly converts a bool3x3 matrix to a float3x3 matrix by componentwise conversion.
float3x3Implicitly converts a single int value to a float3x3 matrix by converting it to float and assigning it to every component.
float3x3Implicitly converts a int3x3 matrix to a float3x3 matrix by componentwise conversion.
float3x3Implicitly converts a single uint value to a float3x3 matrix by converting it to float and assigning it to every component.
float3x3Implicitly converts a uint3x3 matrix to a float3x3 matrix by componentwise conversion.
float3x3Explicitly converts a single double value to a float3x3 matrix by converting it to float and assigning it to every component.
float3x3Explicitly converts a double3x3 matrix to a float3x3 matrix by componentwise conversion.
float3x3 Converts a float4x4 to a float3x3.
operator -Returns the result of a componentwise subtraction operation on two float3x3 matrices.
operator --Returns the result of a componentwise decrement operation on a float3x3 matrix.
operator !=Returns the result of a componentwise not equal operation on two float3x3 matrices.
operator *Returns the result of a componentwise multiplication operation on two float3x3 matrices.
operator /Returns the result of a componentwise division operation on two float3x3 matrices.
operator %Returns the result of a componentwise modulus operation on two float3x3 matrices.
operator +Returns the result of a componentwise addition operation on two float3x3 matrices.
operator +Returns the result of a componentwise unary plus operation on a float3x3 matrix.
operator ++Returns the result of a componentwise increment operation on a float3x3 matrix.
operator <Returns the result of a componentwise less than operation on two float3x3 matrices.
operator <=Returns the result of a componentwise less or equal operation on two float3x3 matrices.
operator ==Returns the result of a componentwise equality operation on two float3x3 matrices.
operator >Returns the result of a componentwise greater than operation on two float3x3 matrices.
operator >=Returns the result of a componentwise greater or equal operation on two float3x3 matrices.