From a009cbdc2fc1922dfc90b178f34e1867598a3296 Mon Sep 17 00:00:00 2001 From: Benjamin Summerton Date: Tue, 18 Jun 2019 02:26:47 -0400 Subject: Add `cbrt()` bindings for the JS Target (#11528) `Math.cbrt()` exists: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cbrt The binding was missing for the JavaScript backend. --- lib/pure/math.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/pure/math.nim b/lib/pure/math.nim index f73d9c8f1..119087107 100644 --- a/lib/pure/math.nim +++ b/lib/pure/math.nim @@ -298,6 +298,9 @@ else: # JS proc sqrt*(x: float32): float32 {.importc: "Math.sqrt", nodecl.} proc sqrt*(x: float64): float64 {.importc: "Math.sqrt", nodecl.} + proc cbrt*(x: float32): float32 {.importc: "Math.cbrt", nodecl.} + proc cbrt*(x: float64): float64 {.importc: "Math.cbrt", nodecl.} + proc ln*(x: float32): float32 {.importc: "Math.log", nodecl.} proc ln*(x: float64): float64 {.importc: "Math.log", nodecl.} -- cgit 1.4.1-2-gfad0