math.order[-docs]: rename parameters in between? to match those in clamp

char-rename
Alexander Iljin 2017-01-13 15:50:16 +03:00 committed by John Benediktsson
parent 0f9836e73c
commit 908ff65bef
2 changed files with 3 additions and 3 deletions

View File

@ -56,8 +56,8 @@ HELP: clamp
{ $description "Outputs " { $snippet "x" } " if contained in the interval " { $snippet "[min,max]" } " or else outputs one of the endpoints." } ;
HELP: between?
{ $values { "x" object } { "y" object } { "z" object } { "?" boolean } }
{ $description "Tests if " { $snippet "x" } " is in the interval " { $snippet "[y,z]" } "." }
{ $values { "x" object } { "min" object } { "max" object } { "?" boolean } }
{ $description "Tests if " { $snippet "x" } " is in the interval " { $snippet "[min,max]" } "." }
{ $notes "As per the closed interval notation, the end-points are included in the interval." } ;
HELP: before?

View File

@ -55,7 +55,7 @@ M: object max [ after? ] most ; inline
: clamp ( x min max -- y ) [ max ] dip min ; inline
: between? ( x y z -- ? )
: between? ( x min max -- ? )
pick after=? [ after=? ] [ 2drop f ] if ; inline
: [-] ( x y -- z ) - 0 max ; inline