mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 03:14:08 +00:00
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.
(cherry picked from commit a009cbdc2f)
This commit is contained in:
committed by
narimiran
parent
4144893ba2
commit
c1097ea949
@@ -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.}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user