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
489 490 491 |
# File 'lib/flt/tolerance.rb', line 489 def cast_value(num_class) Tolerance.epsilon(num_class, @mult) end |
#descr_value ⇒ Object
492 493 494 |
# File 'lib/flt/tolerance.rb', line 492 def descr_value "#{@mult==1 ? '' : "#{@mult} "} eps." end |
#initialize(mult = nil) ⇒ Object
485 486 487 488 |
# File 'lib/flt/tolerance.rb', line 485 def initialize(mult=nil) @mult = mult || 1 super nil end |