Class: Tempura::Newton
- Inherits:
-
Temperature
- Object
- Temperature
- Tempura::Newton
- Defined in:
- lib/tempura/newton.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 ⇒ Object
7 8 9 |
# File 'lib/tempura/newton.rb', line 7 def self.as_native ((k - BigDecimal("273.15")) * 33) / 100 end |
Instance Method Details
#from_native(given) ⇒ Object
3 4 5 |
# File 'lib/tempura/newton.rb', line 3 def from_native(given) ((given * 100) / 33) + BigDecimal("273.15") end |