Made Il2CppEagerStaticClassConstructionAttribute
internal to avoid conflicts with other definitions outside of the package.
Added [Il2CppEagerStaticClassConstruction]
to Unity.Mathematics types to run static constructors at startup. This improves IL2CPP performance slightly for types that have static constructors.
License file updated to satisfy Unity’s package validation tests.
Changed noise documentation in comments to xmldoc comments.
Fixed Equals(object) override which did not check type before casting. This could cause exceptions to be thrown when the object did not match the expected type.
Fixed incorrect math.tzcnt
documentation which mentioned leading zero counts instead of trailing zero counts.
Fixed float2x2.Rotate
documentation to mention radians instead of degrees.
Fixed documentation for methods and properties that were previously undocumented.
[MethodImpl(MethodImplOptions.AggressiveInlining)]
to many static functions to improve IL2CPP performance.compress()
that accepts a float4
and uint4
.math.project()
and math.projectsafe()
for vector projection.math.EPSILON
, math.INFINITY
, math.NAN
and their double counterparts.[Serializable]
to RigidTransform
.math.ceillog2()
.math.floorlog2()
.math.down()
, math.forward()
, etc for Cartesian coordinate axes that match UnityEngine Vector3 equivalents.math.ispow2()
.half.MinValueAsHalf
and half.MaxValueAsHalf
to avoid having to explicitly convert from float.float3x3
constructor which takes a float4x4
as input.[Serializable]
to half types.Random.CreateFromIndex()
to assist in creating Random instances from loop indices.quaternion.RotateX/Y/Z
referred to a float4x4
instead of quaternion.math.countbits()
to include equivalent names on Intel and ARM architectures to aid in discoverability.Unity.Mathematics.Geometry.Plane
to represent planes in 3D space.MinMaxAABB
functionality from Unity.Physics.Aabb
.Unity.Mathematics.Geometry.Math
to hold static functions like AABB transformations.MinMaxAABB
.math.PI
) to provide float constant by default instead of double. Use for example math.PI_DBL
to get the previous double constant.