Class Math
Syntax
Methods
CalculatePerpendicularNormalized(float3, out float3, out float3)
Declaration
public static void CalculatePerpendicularNormalized(float3 v, out float3 p, out float3 q)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
v |
|
Unity.Mathematics.float3 |
p |
|
Unity.Mathematics.float3 |
q |
|
CalculateTwistAngle(quaternion, Int32)
Declaration
public static float CalculateTwistAngle(quaternion q, int twistAxisIndex)
Parameters
Type |
Name |
Description |
Unity.Mathematics.quaternion |
q |
|
Int32 |
twistAxisIndex |
|
Returns
DecomposeRigidBodyOrientation(float4x4)
Physics internally represents all rigid bodies in world space.
If a static body is in a hierarchy, its local-to-world matrix must be decomposed when building the physics world.
This method returns a world-space orientation that would be decomposed for such a rigid body.
Declaration
public static quaternion DecomposeRigidBodyOrientation(in float4x4 localToWorld)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float4x4 |
localToWorld |
|
Returns
Type |
Description |
Unity.Mathematics.quaternion |
A world-space orientation as used by physics.
|
DecomposeRigidBodyTransform(float4x4)
Physics internally represents all rigid bodies in world space.
If a static body is in a hierarchy, its local-to-world matrix must be decomposed when building the physics world.
This method returns a world-space RigidTransform that would be decomposed for such a rigid body.
Declaration
public static RigidTransform DecomposeRigidBodyTransform(in float4x4 localToWorld)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float4x4 |
localToWorld |
|
Returns
Type |
Description |
Unity.Mathematics.RigidTransform |
A world-space RigidTransform as used by physics.
|
Det(float3, float3, float3)
Declaration
public static float Det(float3 a, float3 b, float3 c)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
a |
|
Unity.Mathematics.float3 |
b |
|
Unity.Mathematics.float3 |
c |
|
Returns
DiagonalizeSymmetricApproximation(float3x3, out float3x3, out float3)
Declaration
public static void DiagonalizeSymmetricApproximation(float3x3 a, out float3x3 eigenVectors, out float3 eigenValues)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3x3 |
a |
|
Unity.Mathematics.float3x3 |
eigenVectors |
|
Unity.Mathematics.float3 |
eigenValues |
|
Dotxyz1(double4, double3)
Declaration
public static double Dotxyz1(double4 lhs, double3 rhs)
Parameters
Type |
Name |
Description |
Unity.Mathematics.double4 |
lhs |
|
Unity.Mathematics.double3 |
rhs |
|
Returns
Dotxyz1(float4, float3)
Declaration
public static float Dotxyz1(float4 lhs, float3 rhs)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float4 |
lhs |
|
Unity.Mathematics.float3 |
rhs |
|
Returns
FromToRotation(float3, float3)
Declaration
public static quaternion FromToRotation(float3 from, float3 to)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
from |
|
Unity.Mathematics.float3 |
to |
|
Returns
Type |
Description |
Unity.Mathematics.quaternion |
|
HorizontalMul(float3)
Declaration
public static float HorizontalMul(float3 v)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
v |
|
Returns
HorizontalMul(float4)
Declaration
public static float HorizontalMul(float4 v)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float4 |
v |
|
Returns
IndexOfMaxComponent(float2)
Declaration
public static int IndexOfMaxComponent(float2 v)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float2 |
v |
|
Returns
IndexOfMaxComponent(float3)
Declaration
public static int IndexOfMaxComponent(float3 v)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
v |
|
Returns
IndexOfMaxComponent(float4)
Declaration
public static int IndexOfMaxComponent(float4 v)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float4 |
v |
|
Returns
IndexOfMinComponent(float2)
Declaration
public static int IndexOfMinComponent(float2 v)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float2 |
v |
|
Returns
IndexOfMinComponent(float3)
Declaration
public static int IndexOfMinComponent(float3 v)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
v |
|
Returns
IndexOfMinComponent(float4)
Declaration
public static int IndexOfMinComponent(float4 v)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float4 |
v |
|
Returns
Declaration
public static Math.MTransform Inverse(Math.MTransform a)
Parameters
Returns
IsNormalized(float3)
Declaration
public static bool IsNormalized(float3 v)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
v |
|
Returns
Declaration
public static float3 Mul(Math.MTransform a, float3 x)
Parameters
Returns
Type |
Description |
Unity.Mathematics.float3 |
|
Declaration
public static Math.MTransform Mul(Math.MTransform cFromB, Math.MTransform bFromA)
Parameters
Returns
NextMultipleOf(Int32, Int32)
Declaration
public static int NextMultipleOf(int input, int alignment)
Parameters
Returns
NextMultipleOf(UInt64, UInt64)
Declaration
public static ulong NextMultipleOf(ulong input, ulong alignment)
Parameters
Returns
NextMultipleOf16(Int32)
Declaration
public static int NextMultipleOf16(int input)
Parameters
Type |
Name |
Description |
Int32 |
input |
|
Returns
NextMultipleOf16(UInt64)
Declaration
public static ulong NextMultipleOf16(ulong input)
Parameters
Type |
Name |
Description |
UInt64 |
input |
|
Returns
NormalizeWithLength(float3, out float3)
Declaration
public static float NormalizeWithLength(float3 v, out float3 n)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
v |
|
Unity.Mathematics.float3 |
n |
|
Returns
PlaneFromDirection(float3, float3)
Declaration
public static Plane PlaneFromDirection(float3 origin, float3 direction)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
origin |
|
Unity.Mathematics.float3 |
direction |
|
Returns
PlaneFromTwoEdges(float3, float3, float3)
Declaration
public static Plane PlaneFromTwoEdges(float3 origin, float3 edgeA, float3 edgeB)
Parameters
Type |
Name |
Description |
Unity.Mathematics.float3 |
origin |
|
Unity.Mathematics.float3 |
edgeA |
|
Unity.Mathematics.float3 |
edgeB |
|
Returns
RSqrtSafe(Single)
Declaration
public static float RSqrtSafe(float v)
Parameters
Type |
Name |
Description |
Single |
v |
|
Returns
Declaration
public static Aabb TransformAabb(RigidTransform transform, Aabb aabb)
Parameters
Type |
Name |
Description |
Unity.Mathematics.RigidTransform |
transform |
|
Aabb |
aabb |
|
Returns
Declaration
public static Aabb TransformAabb(Math.MTransform transform, Aabb aabb)
Parameters
Returns
Declaration
public static Plane TransformPlane(RigidTransform transform, Plane plane)
Parameters
Type |
Name |
Description |
Unity.Mathematics.RigidTransform |
transform |
|
Plane |
plane |
|
Returns
Declaration
public static Plane TransformPlane(Math.MTransform transform, Plane plane)
Parameters
Returns