Skip to content

Releases: ltmx/Unity.mathx

1.4.12

24 May 19:14

Choose a tag to compare

1.4.11

30 Sep 06:55

Choose a tag to compare

1.4.10

17 Sep 12:15

Choose a tag to compare

1.4.9

13 Apr 15:42

Choose a tag to compare

1.4.8

10 Apr 10:41

Choose a tag to compare

1.4.7

01 Mar 15:48

Choose a tag to compare

1.3.11

27 Sep 12:41

Choose a tag to compare

Full Changelog: 1.3.10...1.3.11

1.3.10

22 Sep 05:56
96e3617

Choose a tag to compare

Various Bug Fixes, renamings, uniformisation

Full Changelog: 1.3.6...1.3.10

1.2.6

22 Sep 06:24
cf8feb2

Choose a tag to compare

Updated package to the latest Unity.Mathematics version (1.2.6)

New Functions

lerpAngle()
repeat() // from Mathf.PingPong()
pingpong() // from Mathf.PingPong()
approx() // from Mathf.Approx()
asint() // new type conversions
rint() // round to int
clint() // ceil to int
flint() // floor to int
project() // Vector3.Project()
projectsafe() // Vector3.ProjectSafe()
cosh(), sinh(), sech(), tanh(), acosh(), asinh() // and pretty much every other trigonometry function available
isAlwaysTrue() // checks if all components of a bool vector are true
odd() // checks if an int vector is odd (returns a corresponding bool vector)
any() // checks if any component of a bool vector is true
all() // checks if all components of a bool vector are true
anyfloat3.rotateDeg() // rotates a float3 using eulerangles in degrees
anyfloat3.rotateDeg() // rotates a float3 using eulerangles in radians
anyflota3.rotateQuaternion() // rotates a float3 using a quaternion
max0() // clamps negative values to 0
min1() // clamps negative values to 0
remap()
anynan() // checks if any component of a vector is NAN

anyMultidimensionalArray.get() // added Data-accessing functions to select elements of a multidimensional array using int vectors

//Fast functions and approximations
fcos() // fast cosine
sfcos() // another fast cosine implementation using polynomials
veryfastcos()
ultraFastCos() // cosine function polynomial approximation
fmod() // fast mod
modFaster() another fast mod
frcp() // fast reciprocal
fsqrt() // fast square root

New Structs

struct color; // Casts to Color, float4, float3, and acts like a float4 (swizzling and other nice features)
struct bounds; // Same as UnityEngine.Bounds, rewritten for Unity.Mathematics (can cast to Bounds)
struct ray // Same as UnityEngine.Ray, rewritten for Unity.Mathematics (can cast to Ray)

New Shorthands

up, down, left, right, forward, back, zero, one,  for every vector type

New Syntax

anyFloat.xxxx() // enables you to convert any float, bool or int to vectors
anyBool.xx() // returns new bool2(anyBool, anyBool)
anyInt.xxx() // returns new int2(anyInt, anyInt)
// and other conversions

New Type Conversions

List<float> list = anyVector.List() // Returns a list containing individual components of this vector
anyFloatList.toColorArray() // and other conversions
anyVector.Array() // converts any vector to a float array containing its components

Name Changes

normalize() => norm()

New Constants

TwoSqrtEOverPi // 2 * sqrt(e / pi)<
LnPi // ln(pi)
LogTwoSqrtEOverPi // log(2 * sqrt(e / pi))
RAD
DEG
EPSILON
HPI
PINF
NINF

WIP

  • FastNoiseLite Library implementation using Unity.Mathematics Vectors
  • Jobify (trying out Burst-Compiled Function Pointers to try simplifying job creation)

Moved to Unity.Mathematics namespace for better interoperability

Not Working

Random Functions

Deprecated

selfmul() // same as x.dot(x), or (x*x).sum() or x.lengthsq()
quint(), quart() // now pow5, pow4

Full Changelog: 1.1.2...1.2.6

1.3.6

15 May 07:03

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 1.3.5...1.3.6