summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system.nim')
-rwxr-xr-xlib/system.nim5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim
index ae9d6b432..66c5b4dfd 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -60,7 +60,6 @@ proc definedInScope*[T](x: T): bool {.
   ## Special comile-time procedure that checks whether `x` is
   ## defined in the current scope. `x` has to be an identifier.
 
-# these require compiler magic:
 proc `not` *(x: bool): bool {.magic: "Not", noSideEffect.}
   ## Boolean not; returns true iff ``x == false``.
 
@@ -844,6 +843,10 @@ proc toBiggestInt*(f: biggestfloat): biggestint {.
   ## rounds `f` if it does not contain an integer value. If the conversion
   ## fails (because `f` is infinite for example), `EInvalidValue` is raised.
 
+proc `/`*(x, y: int): float {.inline, noSideEffect.} =
+  ## integer division that results in a float.
+  result = toFloat(x) / toFloat(y)
+
 proc addQuitProc*(QuitProc: proc {.noconv.}) {.importc: "atexit", nodecl.}
   ## adds/registers a quit procedure. Each call to ``addQuitProc``
   ## registers another quit procedure. Up to 30 procedures can be