Class Numeric
In: lib/eymiha/math/approximately_equals.rb
lib/eymiha/math/fraction.rb
lib/eymiha/math/rectify.rb
Parent: Object

Behavior added to Numeric by eymiha_math.

Methods

Public Class methods

The default distance from a Numeric below which it is considered to be approximately equal to a another Numeric.

Sets the default distance for approximately equals comparisons.

Public Instance methods

=~(value,epsilon=@@epsilon)

Alias for approximately_equals?

returns true if the difference between the instance and the given Numeric is less than the given distance.

Constrains a value to a lower limit.

Constrains a value to an upper limit.

Treats the low and high as limits, returning low or high if the instance is respectively below or above these values, or the instance if between the two.

Returns a numeric value such that any remainder is evenly divided by the given denominator.

Renders a numeric value as a whole number and a fraction with a given denominator, separated with a given separator, and optionally showing fractions with a numerator of zero.

Treats the interval between low and high as a cycle, returning the result of wrapping the instance around this interval.

[Validate]