mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 04:27:44 +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.
This commit is contained in:
committed by
Varriount
parent
c8268330be
commit
a009cbdc2f
@@ -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