Fix typo and improve grammar for clamps note
This commit is contained in:
parent
d2bf0fb43c
commit
af984a3db9
1 changed files with 1 additions and 1 deletions
|
|
@ -253,7 +253,7 @@ proc clamp*[T](x, a, b: T): T =
|
||||||
## Limits the value `x` within the interval [a, b].
|
## 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 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:
|
runnableExamples:
|
||||||
assert (1.4).clamp(0.0, 1.0) == 1.0
|
assert (1.4).clamp(0.0, 1.0) == 1.0
|
||||||
assert (0.5).clamp(0.0, 1.0) == 0.5
|
assert (0.5).clamp(0.0, 1.0) == 0.5
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue