@mintplayer/polyglot-target-python 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintplayer/polyglot-target-python",
3
- "version": "0.5.2",
3
+ "version": "0.6.0",
4
4
  "description": "MintPlayer Polyglot Python target — a pure-JSON language plugin (spec + emission rules + capabilities + std bindings) for the polyglot transpiler.",
5
5
  "keywords": [
6
6
  "polyglot",
@@ -2754,12 +2754,17 @@
2754
2754
  "Math.sinh": "__import__('math').sinh($0)",
2755
2755
  "Math.cosh": "__import__('math').cosh($0)",
2756
2756
  "Math.tanh": "__import__('math').tanh($0)",
2757
+ "Math.asinh": "__import__('math').asinh($0)",
2758
+ "Math.acosh": "__import__('math').acosh($0)",
2759
+ "Math.atanh": "__import__('math').atanh($0)",
2757
2760
  "Math.trunc": "float(__import__('math').trunc($0))",
2758
2761
  "Math.floor": "float(__import__('math').floor($0))",
2759
2762
  "Math.ceil": "float(__import__('math').ceil($0))",
2760
2763
  "Math.min": "min($0, $1)",
2761
2764
  "Math.max": "max($0, $1)",
2762
2765
  "Math.abs": "abs($0)",
2766
+ "Math.sign": "(lambda a: type(a)(1) if a > 0 else (type(a)(-1) if a < 0 else a - a))($0)",
2767
+ "Math.clamp": "(lambda x, lo, hi: lo if x < lo else (hi if x > hi else x))($0, $1, $2)",
2763
2768
  "Math.round": "float(round($0))"
2764
2769
  },
2765
2770
  "std.strings": {