Class: Tempura::Delisle
- Inherits:
-
Temperature
- Object
- Temperature
- Tempura::Delisle
- Defined in:
- lib/tempura/delisle.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Temperature
#*, #+, #-, #/, #<=>, #initialize, #to, #to_d, #to_f, #to_i
Constructor Details
This class inherits a constructor from Tempura::Temperature
Class Method Details
.as_native(k) ⇒ Object
7 8 9 |
# File 'lib/tempura/delisle.rb', line 7 def self.as_native(k) ((BigDecimal("373.15") - k) * 3) / 2 end |
Instance Method Details
#from_native(given) ⇒ Object
3 4 5 |
# File 'lib/tempura/delisle.rb', line 3 def from_native(given) BigDecimal("373.15") - ((given * 2) / 3) end |