Unity Mathf extensions for more RX-ish style so you can write
var result = a * b * .5f * ((a / b * a2.Tan()).Atan() - (a / b * a1.Tan()).Atan());
instead of
var result = a * b * .5f * (Mathf.Atan(a / b * Mathf.Tan(a2)) - Mathf.Atan(a / b * Mathf.Tan(a1)));
- All
UnityEngine.Mathf
methods - Standard operators and expressions
- Arithmetical
Add
,Sub
,Mul
,Div
,Frac
- Logical
Neg
,And
,Or
,Xor
,AndCond
,OrCond
- Bitwise
BitComplement
,BitLeftShift
,BitRightShift
,BitAnd
,BitOr
,BitXor
- Comparison
Less
,LessEqual
,Great
,GreatEqual
- Arithmetical
You have several options
First, you need to add a scoped registry to Packages/manifest.json
:
"scopedRegistries": [
{
"name": "trismegistus",
"url": "http://upm.trismegistus.tech:4873/",
"scopes": [
"trismegistus.unity"
]
}
]
Then open Window/Package manager
, All packages
, and install Trismegistus Mathf Extensions
- Open
Window/Package manager
+
,Add from git URL
- Enter
https://github.com/Hermesiss/unity-mathf-extensions.git?path=/Packages/trismegistus.unity.mathf-extensions