UnityEngine.MathematicsModule
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.
Read time 3 minutesLast updated 7 hours ago
Definition
- Type: Module
Classes
Class | Description |
|---|---|
| Math | Class containing math functions for MinMaxAABB. |
| math | A static class to contain various math functions and constants. |
| 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. |
| bool2 | A 2 component vector of bools. |
| bool2x2 | A 2x2 matrix of bools. |
| bool2x3 | A 2x3 matrix of bools. |
| bool2x4 | A 2x4 matrix of bools. |
| bool3 | A 3 component vector of bools. |
| bool3x2 | A 3x2 matrix of bools. |
| bool3x3 | A 3x3 matrix of bools. |
| bool3x4 | A 3x4 matrix of bools. |
| bool4 | A 4 component vector of bools. |
| bool4x2 | A 4x2 matrix of bools. |
| bool4x3 | A 4x3 matrix of bools. |
| bool4x4 | A 4x4 matrix of bools. |
| double2 | A 2 component vector of doubles. |
| double2x2 | A 2x2 matrix of doubles. |
| double2x3 | A 2x3 matrix of doubles. |
| double2x4 | A 2x4 matrix of doubles. |
| double3 | A 3 component vector of doubles. |
| double3x2 | A 3x2 matrix of doubles. |
| double3x3 | A 3x3 matrix of doubles. |
| double3x4 | A 3x4 matrix of doubles. |
| double4 | A 4 component vector of doubles. |
| double4x2 | A 4x2 matrix of doubles. |
| double4x3 | A 4x3 matrix of doubles. |
| double4x4 | A 4x4 matrix of doubles. |
| float2 | A 2 component vector of floats. |
| float2x2 | A 2x2 matrix of floats. |
| float2x3 | A 2x3 matrix of floats. |
| float2x4 | A 2x4 matrix of floats. |
| float3 | A 3 component vector of floats. |
| float3x2 | A 3x2 matrix of floats. |
| float3x3 | A 3x3 matrix of floats. |
| float3x4 | A 3x4 matrix of floats. |
| float4 | A 4 component vector of floats. |
| float4x2 | A 4x2 matrix of floats. |
| float4x3 | A 4x3 matrix of floats. |
| float4x4 | A 4x4 matrix of floats. |
| half | A half precision float that uses 16 bits instead of 32 bits. |
| half2 | A 2 component vector of halfs. |
| half3 | A 3 component vector of halfs. |
| half4 | A 4 component vector of halfs. |
| int2 | A 2 component vector of ints. |
| int2x2 | A 2x2 matrix of ints. |
| int2x3 | A 2x3 matrix of ints. |
| int2x4 | A 2x4 matrix of ints. |
| int3 | A 3 component vector of ints. |
| int3x2 | A 3x2 matrix of ints. |
| int3x3 | A 3x3 matrix of ints. |
| int3x4 | A 3x4 matrix of ints. |
| int4 | A 4 component vector of ints. |
| int4x2 | A 4x2 matrix of ints. |
| int4x3 | A 4x3 matrix of ints. |
| int4x4 | A 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. |
| uint2 | A 2 component vector of uints. |
| uint2x2 | A 2x2 matrix of uints. |
| uint2x3 | A 2x3 matrix of uints. |
| uint2x4 | A 2x4 matrix of uints. |
| uint3 | A 3 component vector of uints. |
| uint3x2 | A 3x2 matrix of uints. |
| uint3x3 | A 3x3 matrix of uints. |
| uint3x4 | A 3x4 matrix of uints. |
| uint4 | A 4 component vector of uints. |
| uint4x2 | A 4x2 matrix of uints. |
| uint4x3 | A 4x3 matrix of uints. |
| uint4x4 | A 4x4 matrix of uints. |