28
28
-->
29
29
30
30
### Package name
31
+
32
+ > [ !NOTE] \
33
+ >
31
34
> ``` ruby
32
35
> com.ltmx.mathematics.mathx
33
36
> ` ` `
@@ -114,25 +117,29 @@ bool4.all(); // returns true if all components are true // and-gate
114
117
115
118
<br >
116
119
117
- ## Method List 1.3.6
118
- ``` python
120
+ ## Method List
121
+ ``` ruby
119
122
// most methods have at least a dozen overloads
123
+
120
124
fcos() veryFastCos() ultraFastCos() CosLoop () SinLoop () sfcos() fsqrt()
121
125
fdistance() flength() log2int() fastmodinv() fexp() sfastsine() sfastcosine()
122
126
fastsine() fastcosine() anglerad() angledeg() fastangle() straightsignedangle()
123
- preciseangle() signedangle() fastatan2() sign() abs () mod() frac() csum() cmul()
124
- inv() neg() rcp() pow () sq() cube() pow4() pow5() sqrt() cbrt() rcbrt() rsqrt()
125
- m2n1() add() sub() div() cycle() saturate() snap() bitwave() bitwave2()
126
- triwave() set () Array() toColorArray() tocolorArray() tofloat4List()
127
- tofloat3List() tofloat4Array() tofloat3Array() toVectorArray() tofloatArray()
128
- CopyFrom() asint() asbool() asfloat() asdouble() asuint() ascolor() asColor()
129
- asfloat4() asfloat3() cast() List() toVectorList() tofloatList() toColorList()
130
- tocolorList() toVectorIE() tofloatIE() xx() xxx() xxxx() dim() exp() nexp()
131
- exp2() exp10() ln() log2() log10() f4() f3() f2() append() y() z() yz() w() zw()
132
- yzw() xyzw() xyz() xy() x() smootherstep() smoothstepcos() eerp() uneerp()
133
- smoothstep() unlerp() lerp() lerpAngle() remap() step() arc() arch2() linstep()
134
- sine01() smin() smax() smax_exp() smax_exp2() smax_expOP() smin_exp() smin_pow()
135
- smin_root() smin_polynomial() smin_quadratic() smin_cubic() smin_factor()
127
+ preciseangle() signedangle() signedanglethis() fastatan2() sign() abs() mod()
128
+ frac() csum() cmul() inv() neg() rcp() pow() sq() cube() pow4() pow5() sqrt()
129
+ cbrt() rcbrt() rsqrt() m2n1() add() sub () div() cycle() swapx() swapy() swapz()
130
+ swapw() chgsign() saturate() snap() bitwave() bitwave2() triwave() set()
131
+ quaternion() conjugate() inverse() dot() length() lengthsq() norm() normsafe()
132
+ unitexp() exp() unitlog() log() mul() nlerp() slerp() hash() hashwide()
133
+ forward() toColorArray() tocolorArray() tofloat4List() tofloat3List()
134
+ tofloat4Array() tofloat3Array() toVectorArray() tofloatArray() CopyFrom ()
135
+ asint() asbool() asfloat() asdouble() asuint() ascolor() asColor() asfloat4()
136
+ asfloat3() cast() f() i() List () toVectorList() tofloatList() toColorList()
137
+ tocolorList() toVectorIE() tofloatIE() xx() xxx() xxxx() nexp() exp2() exp10()
138
+ ln() log2() log10() f4() f3() f2() append() y() z() yz() w() zw() yzw() xyzw()
139
+ xyz() xy() x() smootherstep() smoothstepcos() eerp() uneerp() smoothstep()
140
+ unlerp() lerp() lerpAngle() remap() step() arc() arch2() linstep() sine01()
141
+ smin() smax() smax_exp() smax_exp2() smin_exp() smin_pow() smin_root()
142
+ smin_polynomial() smin_quadratic() smin_cubic() smin_factor()
136
143
smin_cubic_factor() smin_N_factor() mix() smoothstart() smoothstop() xfade()
137
144
easeInSine() easeOutSine() easeInOutSine() easeInQuad() easeOutQuad()
138
145
easeInOutQuad() easeInCubic() easeOutCubic() easeInOutCubic() easeInQuart()
@@ -142,39 +149,51 @@ easeInOutCirc() easeInBack() easeOutBack() easeInOutBack() easeInElastic()
142
149
easeOutElastic() easeInOutElastic() easeInBounce() easeOutBounce()
143
150
easeInOutBounce() smooth() smoothstepD() smooth5() smooth5D() smooth7()
144
151
smooth7D() smooth9() smooth9D() smooth11() smooth11D() smoothD() smoother7D()
145
- any () all () select() approx() odd() even() isnan() anynan() isinf() isfinite()
146
- greater() less() lesseq() greatereq() eq() neq() isgreatest() isshortest() get()
147
- pingpong() SampleParabola() movetowards() repeat() smoothdamp() b4x4() b4x3()
148
- b4x2() b3x4() b3x3() b3x2() b2x4() b2x3() b2x2() d4x4() d4x3() d4x2() d3x4()
149
- d3x3() d3x2() d2x4() d2x3() d2x2() mul() dot() lengthsq() mult() transpose()
150
- f4x4() f4x3() f4x2() f3x4() f3x3() f3x2() f2x4() f2x3() f2x2() i4x4() i4x3()
151
- i4x2() i3x4() i3x3() i3x2() i2x4() i2x3() i2x2() u4x4() u4x3() u4x2() u3x4()
152
- u3x3() u3x2() u2x4() u2x3() u2x2() init() randf() randf2() randf3() randf4()
153
- seedrand() seedrand2() seedrand3() seedrand4() randmax() setseed() hash ()
154
- hashwide() varyrand() addrand() rand() randomint() randomInSphere()
152
+ i4() i3() i2() any() all() select () approx() odd() even() greater() less()
153
+ lesseq() greatereq() eq() neq() anygreater() anygreatereq() anyless()
154
+ anylesseq() anyeq() anyneq() isgreatest() isshortest() ispow2() isnan() anynan()
155
+ isinf() isfinite() get() pingpong() SampleParabola () movetowards() repeat()
156
+ smoothdamp() b4x4() b4x3() b4x2() b3x4() b3x3() b3x2() b2x4() b2x3() b2x2()
157
+ d4x4() d4x3() d4x2() d3x4() d3x3() d3x2() d2x4() d2x3() d2x2() mult()
158
+ transpose() diag() f4x4() f4x3() f4x2() f3x4() f3x3() f3x2() f2x4() f2x3()
159
+ f2x2() i4x4() i4x3() i4x2() i3x4() i3x3() i3x2() i2x4() i2x3() i2x2() u4x4()
160
+ u4x3() u4x2() u3x4() u3x3() u3x2() u2x4() u2x3() u2x2() init() randf() randf2()
161
+ randf3() randf4() seedrand() seedrand2() seedrand3() seedrand4() randmax()
162
+ setseed() varyrand() addrand() rand () randomint() randomInSphere()
155
163
randomInCircle() randomDir3D() randomDir2D() randomrotation() rotate()
156
- rotateAxisAngle() rotateRad() rotateDeg() quaternion () rotateAround () round ()
157
- rint () clamp () min () max () ceil() clint() floor() flint() sat() npsat () limp ()
158
- limn () under1 () cmax () cmin () acmax () acmin () sin () cos() tan() sec() cot ()
159
- csc () asin () acos () atan () atan2 () acot() asec() acsc() sin2() cos2() tan2 ()
160
- sec2 () deg () rad () cossin () sincos () mod360 () mod2PI () sinh () cosh () tanh ()
161
- sech () coth () csch () acosh () asinh () atanh () acoth () asech () acsch () norm ()
162
- normsafe () distance () distancesq () length () reflect () refract () project ()
163
- projectsafe () manhattan () minkowski () chebyshev () cross () perp () exterior ()
164
- orthonorm () cdistance () cdistancesq () ccross () cdot () hashnp01 () Hash ()
165
- GradientNoise () GenerateGradient () randdir () unity_gradientNoise () hashx ()
164
+ rotateAxisAngle() rotateRad() rotateDeg() rotateAround () clamp () min() max ()
165
+ round () rint () ceil() clint() floor() flint() sat() limp () limn() under1 ()
166
+ clampsigned () maxsigned () minsigned () satsigned () cmax () cmin () acmax () acmin ()
167
+ matrix () float3x4 () rotationMatrix () translationMatrix () transform () rotation ()
168
+ up () right () scale () sin () cos () tan () sec () cot () csc () asin() acos() atan ()
169
+ atan2 () acot () asec () acsc () sin2 () cos2 () tan2 () sec2 () deg () rad() cossin ()
170
+ sincos () mod360 () mod2PI () sinh () cosh () tanh () sech() coth() csch() acosh ()
171
+ asinh () atanh () acoth () asech () acsch () distance () distancesq() reflect ()
172
+ refract () project () projectsafe () manhattan () minkowski () chebyshev () cross ()
173
+ perp () exterior () orthonorm () cdistance () cdistancesq() ccross() cdot ()
166
174
openSimplex2_ImproveXY() openSimplex2SDerivatives_ImproveXY() sdSphere() sdBox()
167
175
sdRoundBox() sdBoxFrame() sdTorus() sdCappedTorus() sdLink() sdCylinder()
168
176
sdCone() sdConeBound() sdPlane() sdHexPrism() sdTriPrism() sdCapsule()
169
177
sdVerticalCapsule() sdCappedCylinder() sdRoundedCylinder() sdCappedCone()
170
178
sdSolidAngle() sdCutSphere() sdCutHollowSphere() sdDeathStar() sdRoundCone()
171
179
sdEllipsoid() sdbEllipsoid_2() sdaEllipsoid_3() sdRhombus() sdOctahedron()
172
- sdOctahedronBound() sdPyramid() udTriangle() udQuad() _length2 () _length6 ()
173
- _length8 () byte1() byte2() byte3() byte4() color() gammatolinear()
180
+ sdOctahedronBound() sdPyramid() udTriangle() udQuad() length2 () length6 ()
181
+ length8 () byte1() byte2() byte3() byte4() color() gammatolinear()
174
182
lineartogama() Erf () Erfc () ErfInv () ErfcInv () GammaLn () Gamma () DiGamma ()
175
- DiGammaInv() conjugate() inverse() unitexp() unitlog() log() nlerp() slerp()
176
- forward() matrix() float3x4() rotation() translation() transform() up() right()
177
- scale() projectplane() apply() GetFunctionPointerDelegate()
183
+ DiGammaInv () projectplane() apply() smin() smax()
184
+ smax_exp() smin_exp()
185
+ ```
186
+
187
+ ## Constant & Static fields
188
+ ``` ruby
189
+ RAD DEG RAD_DBL DEG_DBL EPSILON EPSILON_DBL FourPI FourPI_DBL TAU TAU_DBL TwoPI
190
+ TwoPI_DBL PI PI_DBL HalfPI HPI HalfPI_DBL HPId PHI_DBL PHI PINF NINF PINF_DBL
191
+ NINF_DBL E_DBL E TwoSqrtEOverPI LnPI LogTwoSqrtEOverPI HalfSQRT2 HSQRT SQRT3
192
+ HalfSQRT3 HSQRT3 InvSQRT2 RSQRT2 INLINE IL NEVER upd2 downd2 rightd2 leftd2 upd3
193
+ rightd3 forwardd3 downd3 leftd3 backd3 oned2 zerod2 oned3 zerod3 oned4 zerod4
194
+ upf2 downf2 rightf2 leftf2 upf3 rightf3 forwardf3 downf3 leftf3 backf3 onef2
195
+ zerof2 onef3 zerof3 onef4 zerof4 upi2 downi2 righti2 lefti2 upi3 righti3
196
+ forwardi3 downi3 lefti3 backi3 onei2 zeroi2 onei3 zeroi3 onei4 zeroi4
178
197
```
179
198
180
199
@@ -195,41 +214,6 @@ scale() projectplane() apply() GetFunctionPointerDelegate()
195
214
- Unification is key : if some functions are already available in math or Unity.Mathematics.math (sometimes under another name), use them !
196
215
- Documentation should be inherited from Unity.Mathematics.math methods for direct extension method translations
197
216
198
- <!--
199
-
200
- ## 🎇 New Methods in 1.3.0
201
- ```python
202
- anyType.dim(otherType) => anyType* otherType // to add functionality missing from internal operator overloads // named dim to not confuse with mul()
203
- anyType.greater(otherType) => anyType > otherType
204
- anyType.less(otherType) => anyType < otherType
205
- anyType.greatereq(otherType) => anyType >= otherType
206
- anyType.lesseq(otherType) => anyType <= otherType
207
- anyType.eq(otherType) => anyType == otherType
208
- anyType.neq(otherType) => anyType != otherType
209
- randseed(seed) => random float generated from a seed // internally : Random.Init(seed).Nextfloat()
210
- randseed2(seed) => random float2 generated from a seed // internally : Random.Init(seed).Nextfloat()
211
- randseed3(seed) => random float3 generated from a seed // internally : Random.Init(seed).Nextfloat()
212
- randseed4(seed) => random float4 generated from a seed // internally : Random.Init(seed).Nextfloat()
213
- anyType.append()
214
- anyType.m2n1() => anyType* 2 - 1 // remaps anything from [0, 1] to [-1, 1]
215
- quaternion generation functions
216
- matrix generation functions
217
- transformation functions
218
- dot() // for int types
219
- value.lerp(MatrixA, MatrixB) // functionality to interpolate any matrix
220
- anyType.dim(otherType) => anyType * otherType // to add functionality for missing from operator overloads // 'dim' to not confuse with mul()
221
- anyType.div(otherType) => anyType / otherType
222
- anyType.add(otherType) => anyType + otherType
223
- anyType.sub(otherType) => anyType - otherType
224
- anyType.shuffle() // only for float2, float3 and float4
225
- anyType.hash() // math.hash(anyType)
226
- type generation methods float4(), float2(), float4x4(), etc
227
- asuint() // new overloads
228
- asbool() // new overloads
229
- ```
230
-
231
- -->
232
-
233
217
<br >
234
218
235
219
## 📜 LICENSING
0 commit comments