CFLib.org – Common Function Library Project

CelsiusToFahrenheit(celsius)

Last updated September 17, 2001

Version: 1 | Requires: ColdFusion 5 | Library: ScienceLib

 
Rated 2 time(s). Average Rating: 5.0

Description:
Converts from degrees Celsius to degrees Fahrenheit.

Return Values:
Returns a simple value

Example:

view plain print about
<CFSET c=100>
  <CFOUTPUT>
  Given c=#c#<BR>
  #c# degrees Celsius = #CelsiusToFahrenheit(c)# degrees Fahrenheit
  </CFOUTPUT>

Parameters:

Name Description Required
celsius Degrees Celsius to convert to degrees Fahrenheit Yes

Full UDF Source:

view plain print about
<cfscript>
/**
 * Converts Celsius to Fahrenheit.
 * Renamed from CelToFar to CelsiusToFahrenheit.
 * 
 * @param celsius      Degrees Celsius to convert to degrees Fahrenheit 
 * @return Returns a simple value 
 * @author Rob Brooks-Bilson (rbils@amkor.com) 
 * @version 1, September 17, 2001 
 */

function CelsiusToFahrenheit(celsius)
{
  Return ((212-32)/100 * celsius + 32);
}
</cfscript>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Tayo Akinmade Tayo Akinmade added
arrayTrim
4 day(s) ago

Will Belden Will Belden added
longTime
9 day(s) ago

James Sleeman James Sleeman added
quickSort
19 day(s) ago

Ben Forta Ben Forta added
GetHostAddress
22 day(s) ago

Top Rated

Darwan Leonardo Sitepu EksporSQLData
Rated 5.0, 16 time(s)

Darwan Leonardo Sitepu backupDatabase
Rated 5.0, 13 time(s)

Barney Boisvert indentXml
Rated 5.0, 10 time(s)

Kevin Pepperman generateSsccAsn
Rated 5.0, 4 time(s)

Created by Raymond Camden / Design by Justin Johnson