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.
This commit is contained in:
parent
c8268330be
commit
a009cbdc2f
1 changed files with 3 additions and 0 deletions
|
|
@ -298,6 +298,9 @@ else: # JS
|
||||||
proc sqrt*(x: float32): float32 {.importc: "Math.sqrt", nodecl.}
|
proc sqrt*(x: float32): float32 {.importc: "Math.sqrt", nodecl.}
|
||||||
proc sqrt*(x: float64): float64 {.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: float32): float32 {.importc: "Math.log", nodecl.}
|
||||||
proc ln*(x: float64): float64 {.importc: "Math.log", nodecl.}
|
proc ln*(x: float64): float64 {.importc: "Math.log", nodecl.}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue