Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/plusminus.rb

Direct Known Subclasses

Plusminus::PlusminusFloat

Instance Method Summary collapse

Instance Method Details

#deltaObject



19
20
21
# File 'lib/plusminus.rb', line 19

def delta
  0
end

#pm(delta) ⇒ Object



7
8
9
# File 'lib/plusminus.rb', line 7

def pm delta
  Plusminus::PlusminusFloat.new self, delta
end

#pm_rel(rel) ⇒ Object



11
12
13
# File 'lib/plusminus.rb', line 11

def pm_rel rel
  Plusminus::PlusminusFloat.new self, abs*rel
end

#to_pmObject



15
16
17
# File 'lib/plusminus.rb', line 15

def to_pm
  Plusminus::PlusminusFloat.new self, 0
end