Changeset 2160

Show
Ignore:
Timestamp:
02/07/07 06:29:20
Author:
miyagawa
Message:

add temperature

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • misc/unitconverter.cgi

    r2136 r2160  
    108108sub convert_sqm_sqf { 
    109109    return $_[0] / 0.09290304; 
     110} 
     111 
     112sub convert_celsius_fahrenheit { 
     113    (9 / 5) * $_[0] + 32; 
     114} 
     115 
     116sub convert_fahrenheit_celsius { 
     117    (5 / 9) * ($_[0] - 32); 
    110118} 
    111119 
     
    185193<span id="dimensions-spinner"></span> 
    186194</p> 
     195 
     196<h2>Temperature</h2> 
     197<p> 
     198<input type="text" size="12" id="fahrenheit" onchange="doConvert('fahrenheit', 'celsius', 'temperature')" /> °F =  
     199<input type="text" size="12" id="celsius" onchange="doConvert('celsius', 'fahrenheit', 'temperature')" /> °C 
     200<span id="temperature-spinner"></span> 
     201</p> 
     202 
    187203 
    188204