Simplified math-compare by using bi@.

db4
John Benediktsson 2008-09-23 21:24:04 -07:00
parent 8ad11e7906
commit 934833287d
1 changed files with 2 additions and 2 deletions

View File

@ -6,10 +6,10 @@ USING: math math.order kernel ;
IN: math.compare
: absmin ( a b -- x )
[ [ abs ] dip abs < ] 2keep ? ;
[ [ abs ] bi@ < ] 2keep ? ;
: absmax ( a b -- x )
[ [ abs ] dip abs > ] 2keep ? ;
[ [ abs ] bi@ > ] 2keep ? ;
: posmax ( a b -- x )
0 max max ;