mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-09 23:37:51 +07:00
Inverse trig logic functions
This commit is contained in:
@ -1636,9 +1636,15 @@ lenum.min = Minimum of two numbers.
|
||||
lenum.max = Maximum of two numbers.
|
||||
lenum.angle = Angle of vector in degrees.
|
||||
lenum.len = Length of vector.
|
||||
|
||||
lenum.sin = Sine, in degrees.
|
||||
lenum.cos = Cosine, in degrees.
|
||||
lenum.tan = Tangent, in degrees.
|
||||
|
||||
lenum.asin = Arc sine, in degrees.
|
||||
lenum.acos = Arc cosine, in degrees.
|
||||
lenum.atan = Arc tangent, in degrees.
|
||||
|
||||
#not a typo, look up 'range notation'
|
||||
lenum.rand = Random decimal in range [0, value).
|
||||
lenum.log = Natural logarithm (ln).
|
||||
|
@ -36,13 +36,20 @@ public enum LogicOp{
|
||||
abs("abs", a -> Math.abs(a)),
|
||||
log("log", Math::log),
|
||||
log10("log10", Math::log10),
|
||||
sin("sin", d -> Math.sin(d * 0.017453292519943295D)),
|
||||
cos("cos", d -> Math.cos(d * 0.017453292519943295D)),
|
||||
tan("tan", d -> Math.tan(d * 0.017453292519943295D)),
|
||||
floor("floor", Math::floor),
|
||||
ceil("ceil", Math::ceil),
|
||||
sqrt("sqrt", Math::sqrt),
|
||||
rand("rand", d -> Mathf.rand.nextDouble() * d);
|
||||
rand("rand", d -> Mathf.rand.nextDouble() * d),
|
||||
|
||||
sin("sin", d -> Math.sin(d * Mathf.doubleDegRad)),
|
||||
cos("cos", d -> Math.cos(d * Mathf.doubleDegRad)),
|
||||
tan("tan", d -> Math.tan(d * Mathf.doubleDegRad)),
|
||||
|
||||
asin("asin", d -> Math.asin(d) * Mathf.doubleRadDeg),
|
||||
acos("acos", d -> Math.acos(d) * Mathf.doubleRadDeg),
|
||||
atan("atan", d -> Math.atan(d) * Mathf.doubleRadDeg),
|
||||
|
||||
;
|
||||
|
||||
public static final LogicOp[] all = values();
|
||||
|
||||
|
Reference in New Issue
Block a user