minor improvement on math.nim (#16733)

This commit is contained in:
flywind 2021-01-16 05:37:23 -06:00 • committed by GitHub
commit 8939de15d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -886,8 +886,8 @@ else: # JS
func trunc*(x: float32): float32 {.importc: "Math.trunc", nodecl.} func trunc*(x: float32): float32 {.importc: "Math.trunc", nodecl.}
func trunc*(x: float64): float64 {.importc: "Math.trunc", nodecl.} func trunc*(x: float64): float64 {.importc: "Math.trunc", nodecl.}
func `mod`*(x, y: float32): float32 {.importcpp: "# % #".} func `mod`*(x, y: float32): float32 {.importjs: "(# % #)".}
func `mod`*(x, y: float64): float64 {.importcpp: "# % #".} func `mod`*(x, y: float64): float64 {.importjs: "(# % #)".}
## Computes the modulo operation for float values (the remainder of ``x`` divided by ``y``). ## Computes the modulo operation for float values (the remainder of ``x`` divided by ``y``).
## ##
## .. code-block:: nim ## .. code-block:: nim