mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-25 16:53:59 +00:00
Fix typo and improve grammar for clamps note
This commit is contained in:
@@ -253,7 +253,7 @@ 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))`.
|
||||
##
|
||||
## **Note that** `a < b` is assuemed and no check for it.
|
||||
## **Note:** `a < b` is assumed and will not be checked.
|
||||
runnableExamples:
|
||||
assert (1.4).clamp(0.0, 1.0) == 1.0
|
||||
assert (0.5).clamp(0.0, 1.0) == 0.5
|
||||
|
||||
Reference in New Issue
Block a user