summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-05-04 10:58:21 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-05-04 10:58:21 +0200
commitc1aa973758a60d7ef0e698c94861b74132612de5 (patch)
tree154b40aac2ce5eab835b7fa3aee2c94c06cd8d6a /lib/system.nim
parent962d03d6717a5b03de52cc18aeb8ad9458a6eb8f (diff)
parent27b571dd9598d144a1d15963d9c73e75d7d764c4 (diff)
downloadNim-c1aa973758a60d7ef0e698c94861b74132612de5.tar.gz
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 82d3bb7f7..9b41253cc 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -2016,6 +2016,12 @@ proc min*(x, y: float): float {.magic: "MinF64", noSideEffect.} =
   if x <= y: x else: y
 proc max*(x, y: float): float {.magic: "MaxF64", noSideEffect.} =
   if y <= x: x else: y
+
+proc min*[T](x, y: T): T =
+  if x <= y: x else: y
+
+proc max*[T](x, y: T): T =
+  if y <= x: x else: y
 {.pop.}
 
 proc clamp*[T](x, a, b: T): T =