Magnitude:
Filter:
Classes | Math

Magnitude : Object

Comparable value in a linear continuum
Source: Magnitude.sc
Subclasses: Association, Char, Number

Description

Magnitudes represent values along a linear continuum which can be compared against each other.

Class Methods

Inherited class methods

Instance Methods

<(aMagnitude)

Returns:

a Boolean whether the receiver is less than aMagnitude.

<=(aMagnitude)

Returns:

a Boolean whether the receiver is less than or equal to aMagnitude.

>(aMagnitude)

Returns:

a Boolean whether the receiver is greater than aMagnitude.

>=(aMagnitude)

Returns:

a Boolean whether the receiver is greater than or equal to aMagnitude.

.min(aMagnitude)

Returns:

the minimum of the receiver and aMagnitude.

.max(aMagnitude)

Returns:

the maximum of the receiver and aMagnitude.

.clip(lo, hi)

If the receiver is less than minVal then answer minVal, else if the receiver is greater than maxVal then answer maxVal, else answer the receiver.

.inclusivelyBetween(lo, hi)

Returns:

whether the receiver is greater than or equal to minVal and less than or equal to maxVal.

.exclusivelyBetween(lo, hi)

Returns:

whether the receiver is greater than minVal and less than maxVal.

Inherited instance methods

Undocumented instance methods

!=(aMagnitude)

==(aMagnitude)

.hash