Module: Flt::EpsilonMixin
- Included in:
- AbsBigEpsilonTolerance, AbsEpsilonTolerance, EpsilonTolerance, FltEpsilonTolerance
- Defined in:
- lib/flt/tolerance.rb
Overview
Mixin for tolerances defined by Epsilon or a multiple of it
Instance Method Summary collapse
Instance Method Details
#cast_value(num_class) ⇒ Object
484 485 486 |
# File 'lib/flt/tolerance.rb', line 484 def cast_value(num_class) Tolerance.epsilon(num_class, @mult) end |
#descr_value ⇒ Object
487 488 489 |
# File 'lib/flt/tolerance.rb', line 487 def descr_value "#{@mult==1 ? '' : "#{@mult} "} eps." end |
#initialize(mult = nil) ⇒ Object
480 481 482 483 |
# File 'lib/flt/tolerance.rb', line 480 def initialize(mult=nil) @mult = mult || 1 super nil end |