summary refs log tree commit diff stats
path: root/lib/pure/math.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/math.nim')
-rw-r--r--lib/pure/math.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/math.nim b/lib/pure/math.nim
index bcda68afe..f9cf5f700 100644
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -886,8 +886,8 @@ else: # JS
   func trunc*(x: float32): float32 {.importc: "Math.trunc", nodecl.}
   func trunc*(x: float64): float64 {.importc: "Math.trunc", nodecl.}
 
-  func `mod`*(x, y: float32): float32 {.importcpp: "# % #".}
-  func `mod`*(x, y: float64): float64 {.importcpp: "# % #".}
+  func `mod`*(x, y: float32): float32 {.importjs: "(# % #)".}
+  func `mod`*(x, y: float64): float64 {.importjs: "(# % #)".}
     ## Computes the modulo operation for float values (the remainder of ``x`` divided by ``y``).
     ##
     ## .. code-block:: nim