math.ratios: slight fix to M\ ratio recip for negative ratios.
parent
009fb4249e
commit
8ed541b26b
|
@ -41,7 +41,7 @@ M: integer recip
|
||||||
] if-zero ;
|
] if-zero ;
|
||||||
|
|
||||||
M: ratio recip
|
M: ratio recip
|
||||||
>fraction swap fraction> ;
|
>fraction swap dup 0 < [ [ neg ] bi@ ] when fraction> ;
|
||||||
|
|
||||||
M: ratio hashcode*
|
M: ratio hashcode*
|
||||||
nip >fraction [ hashcode ] bi@ bitxor ;
|
nip >fraction [ hashcode ] bi@ bitxor ;
|
||||||
|
|
Loading…
Reference in New Issue