[REBOL] absolute zero
From: rchristiansen::pop::isdfa::sei-it::com at: 15-Dec-2000 17:32
In order to prove to my IRC buddies that -20F in Fargo, North Dakota,
is NOT anywhere near absolute zero, I have updated my temperature
conversion object to include Kelvin conversions, as follows:
>> convert-temp/F-K -20
== 244.261111111111
-20F = 244.26K
REBOL [
Title: "Temperature Converter"
Date: 15-Dec-2000
Version: 1.0.0
File: %convert-temp.r
Author: "Ryan C. Christiansen"
Email: [norsepower--uswest--net]
Purpose: {
Convert Temperatures to and from units in Fahrenheit, Celsius,
or Kelvin.
}
Example: {
>> convert-temp/F-C 212
== 100
}
]
convert-temp: make object! [
F-C: func [F] [C: ((F - 32) / 9) * 5]
C-F: func [C] [F: ((C * 9) / 5) + 32]
C-K: func [C] [K: C + 273.15]
F-K: func [F] [K: (((F - 32) / 9) * 5) + 273.15]
K-C: func [K] [C: K - 273.15]
K-F: func [K] [F: (((K - 273.15) * 9) / 5) + 32]
]