class Forecastr::TemperatureConverter

Public Class Methods

to_celsius(kelvins) click to toggle source
# File lib/forecastr/temperature_converter.rb, line 4
def to_celsius kelvins
  (kelvins - 273.15).round(2)
end
to_farenheit(kelvins) click to toggle source
# File lib/forecastr/temperature_converter.rb, line 8
def to_farenheit kelvins
  (1.8 * (kelvins - 273.15) + 32).round(2)
end