home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_300
/
310_01
/
magnitud.st
< prev
next >
Wrap
Text File
|
1990-04-20
|
445b
|
30 lines
Class Magnitude
[
<= arg
^ (self < arg) or: [self = arg]
| < arg
^ (arg > self)
| = arg
^ (self > arg or: [self < arg]) not
| ~= arg
^ (self = arg) not
| >= arg
^ (self > arg) or: [self = arg]
| > arg
^ arg < self
| between: low and: high
^ (self >= low) and: [self <= high]
| min: arg
^ (self < arg) ifTrue: [self] ifFalse: [arg]
| max: arg
^ (self > arg) ifTrue: [self] ifFalse: [arg]
]