From 8939de15d76fa43a4ce2c5cc3c693a2d47383ed9 Mon Sep 17 00:00:00 2001 From: flywind <43030857+xflywind@users.noreply.github.com> Date: Sat, 16 Jan 2021 05:37:23 -0600 Subject: minor improvement on math.nim (#16733) --- lib/pure/math.nim | 4 ++-- 1 file 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 -- cgit 1.4.1-2-gfad0