Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

UnityEngine.MathematicsModule

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

The Mathematics module is a C# math library especially optimized for use with the Burst compiler. It provides vector types and common math functions with a shader-like syntax. When compiled with Burst, many operations have intrinsics implemented that use SIMD instructions.

Classes

Class Description
math A static class to contain various math functions and constants.
Math Class containing math functions for MinMaxAABB.
noise A static class containing noise functions.
svd Class with methods for computing the Singular Value Decomposition (SVD) of 3x3 matrices.

Structs

Struct Description
AffineTransform An affine transformation type.
bool2A 2 component vector of bools.
bool2x2A 2x2 matrix of bools.
bool2x3A 2x3 matrix of bools.
bool2x4A 2x4 matrix of bools.
bool3A 3 component vector of bools.
bool3x2A 3x2 matrix of bools.
bool3x3A 3x3 matrix of bools.
bool3x4A 3x4 matrix of bools.
bool4A 4 component vector of bools.
bool4x2A 4x2 matrix of bools.
bool4x3A 4x3 matrix of bools.
bool4x4A 4x4 matrix of bools.
double2A 2 component vector of doubles.
double2x2A 2x2 matrix of doubles.
double2x3A 2x3 matrix of doubles.
double2x4A 2x4 matrix of doubles.
double3A 3 component vector of doubles.
double3x2A 3x2 matrix of doubles.
double3x3A 3x3 matrix of doubles.
double3x4A 3x4 matrix of doubles.
double4A 4 component vector of doubles.
double4x2A 4x2 matrix of doubles.
double4x3A 4x3 matrix of doubles.
double4x4A 4x4 matrix of doubles.
float2A 2 component vector of floats.
float2x2A 2x2 matrix of floats.
float2x3A 2x3 matrix of floats.
float2x4A 2x4 matrix of floats.
float3A 3 component vector of floats.
float3x2A 3x2 matrix of floats.
float3x3A 3x3 matrix of floats.
float3x4A 3x4 matrix of floats.
float4A 4 component vector of floats.
float4x2A 4x2 matrix of floats.
float4x3A 4x3 matrix of floats.
float4x4A 4x4 matrix of floats.
half A half precision float that uses 16 bits instead of 32 bits.
half2A 2 component vector of halfs.
half3A 3 component vector of halfs.
half4A 4 component vector of halfs.
int2A 2 component vector of ints.
int2x2A 2x2 matrix of ints.
int2x3A 2x3 matrix of ints.
int2x4A 2x4 matrix of ints.
int3A 3 component vector of ints.
int3x2A 3x2 matrix of ints.
int3x3A 3x3 matrix of ints.
int3x4A 3x4 matrix of ints.
int4A 4 component vector of ints.
int4x2A 4x2 matrix of ints.
int4x3A 4x3 matrix of ints.
int4x4A 4x4 matrix of ints.
MinMaxAABB Axis aligned bounding box (AABB) stored in min and max form.
Plane A plane represented by a normal vector and a distance along the normal from the origin.
quaternion A quaternion type for representing rotations.
Random Random Number Generator based on xorshift. Designed for minimal state (32bits) to be easily embeddable into components. Core functionality is integer multiplication free to improve vectorization on less capable SIMD instruction sets.
RigidTransform A rigid transformation type.
uint2A 2 component vector of uints.
uint2x2A 2x2 matrix of uints.
uint2x3A 2x3 matrix of uints.
uint2x4A 2x4 matrix of uints.
uint3A 3 component vector of uints.
uint3x2A 3x2 matrix of uints.
uint3x3A 3x3 matrix of uints.
uint3x4A 3x4 matrix of uints.
uint4A 4 component vector of uints.
uint4x2A 4x2 matrix of uints.
uint4x3A 4x3 matrix of uints.
uint4x4A 4x4 matrix of uints.