Module: Flt::BigEpsilonMixin

Included in:
BigEpsilonTolerance, FltBigEpsilonTolerance
Defined in:
lib/flt/tolerance.rb

Overview

Mixin for tolerances defined by Big Epsilon or a multiple of it

Instance Method Summary collapse

Instance Method Details

#cast_value(num_class) ⇒ Object


518
519
520
# File 'lib/flt/tolerance.rb', line 518

def cast_value(num_class)
  Tolerance.big_epsilon(num_class, @mult)
end

#descr_valueObject


521
522
523
# File 'lib/flt/tolerance.rb', line 521

def descr_value
  "#{@mult==1 ? '' : "#{@mult} "} big eps."
end

#initialize(mult = nil) ⇒ Object


514
515
516
517
# File 'lib/flt/tolerance.rb', line 514

def initialize(mult=nil)
  @mult = mult || 1
  super nil
end