|
1 | 1 | package xyz.javecs.tools.expr |
2 | 2 |
|
3 | | -fun builtIn() = HashMap<String, (Double) -> Double>().apply { |
| 3 | +internal fun builtIn() = HashMap<String, (Double) -> Double>().apply { |
4 | 4 | put("sin", { x -> Math.sin(x) }) |
5 | 5 | put("cos", { x -> Math.cos(x) }) |
6 | 6 | put("tan", { x -> Math.tan(x) }) |
7 | 7 | put("asin", { x -> Math.asin(x) }) |
8 | 8 | put("acos", { x -> Math.acos(x) }) |
9 | 9 | put("atan", { x -> Math.atan(x) }) |
| 10 | + put("sinh", { x -> Math.sinh(x) }) |
| 11 | + put("cosh", { x -> Math.cosh(x) }) |
| 12 | + put("tanh", { x -> Math.tanh(x) }) |
10 | 13 | put("exp", { x -> Math.exp(x) }) |
11 | 14 | put("log", { x -> Math.log(x) }) |
12 | 15 | put("log10", { x -> Math.log10(x) }) |
13 | 16 | put("sqrt", { x -> Math.sqrt(x) }) |
14 | | - put("cbrt", { x -> Math.cbrt(x) }) |
15 | | - put("ceil", { x -> Math.ceil(x) }) |
16 | | - put("floor", { x -> Math.floor(x) }) |
17 | | - put("rint", { x -> Math.rint(x) }) |
18 | | - put("abs", { x -> Math.abs(x) }) |
19 | | - put("ulp", { x -> Math.ulp(x) }) |
20 | | - put("signum", { x -> Math.signum(x) }) |
21 | | - put("sinh", { x -> Math.sinh(x) }) |
22 | | - put("cosh", { x -> Math.cosh(x) }) |
23 | | - put("tanh", { x -> Math.tanh(x) }) |
24 | | - put("expm1", { x -> Math.expm1(x) }) |
25 | | - put("log1p", { x -> Math.log1p(x) }) |
| 17 | + put("rad", { x -> Math.toRadians(x) }) |
| 18 | + put("deg", { x -> Math.toDegrees(x) }) |
26 | 19 | } |
0 commit comments