units.reduction: avoid double length calls in find-unit-suffix.
parent
94ed98e78c
commit
8ccb173da0
|
@ -16,9 +16,9 @@ CONSTANT: unit-suffix-hash H{
|
||||||
[ * ] dip swap ^ ; inline
|
[ * ] dip swap ^ ; inline
|
||||||
|
|
||||||
:: find-unit-suffix ( suffixes n multiplier base -- i/f )
|
:: find-unit-suffix ( suffixes n multiplier base -- i/f )
|
||||||
suffixes length
|
suffixes length [
|
||||||
[ [ n ] dip multiplier base threshhold < ] find-integer
|
[ [ n ] dip multiplier base threshhold < ] find-integer
|
||||||
suffixes length or 1 [-] ;
|
] keep or 1 [-] ;
|
||||||
|
|
||||||
:: reduce-magnitude ( n multiplier base suffixes -- string )
|
:: reduce-magnitude ( n multiplier base suffixes -- string )
|
||||||
n 0 < [
|
n 0 < [
|
||||||
|
|
Loading…
Reference in New Issue