fix floor/ceiling words

cvs
Slava Pestov 2005-04-30 04:59:56 +00:00
parent cd978d822e
commit 9835ce4b03
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ math namespaces parser strings words ;
: array-constructor ( width -- )
#! Make a word <foo-array> ( n -- byte-array ).
"struct-name" get "-array" cat2 constructor-word
swap cell / ceiling [ * <byte-array> ] cons
swap [ * <byte-array> ] cons
define-compound ;
: define-nth ( width -- )

View File

@ -39,5 +39,5 @@ M: ratio /i scale /i ;
M: ratio /f scale /f ;
M: ratio truncate >fraction /i ;
M: ratio floor >fraction /mod dup 0 < [ 1 - ] when ;
M: ratio ceiling >fraction /mod dup 0 > [ 1 + ] when ;
M: ratio floor >fraction /i dup 0 < [ 1 - ] when ;
M: ratio ceiling >fraction /i dup 0 > [ 1 + ] when ;