summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/comparisons.nim7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/system/comparisons.nim b/lib/system/comparisons.nim
index 6c67ca493..2e5664a95 100644
--- a/lib/system/comparisons.nim
+++ b/lib/system/comparisons.nim
@@ -251,9 +251,12 @@ proc max*[T](x: openArray[T]): T =
 
 proc clamp*[T](x, a, b: T): T =
   ## Limits the value `x` within the interval [a, b].
-  ## This proc is equivalent to but fatser than `max(a, min(b, x))`.
+  ## This proc is equivalent to but faster than `max(a, min(b, x))`.
   ## 
-  ## **Note:** `a <= b` is assumed and will not be checked.
+  ## .. warning:: `a <= b` is assumed and will not be checked (currently).
+  ##
+  ## **See also:**
+  ## `math.clamp` for a version that takes a `Slice[T]` instead.
   runnableExamples:
     assert (1.4).clamp(0.0, 1.0) == 1.0
     assert (0.5).clamp(0.0, 1.0) == 0.5