CFLib.org – Common Function Library Project

CircumferenceCircle(radius)

Last updated July 17, 2001

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

 
Rated 1 time(s). Average Rating: 2.0

Description:
Calculates the circumference of a circle based on the radius.

Return Values:
Returns a simple value

Example:

view plain print about
<CFSET radius=4>
  <CFOUTPUT>
  Given: radius = #radius#
  The circumference of the circle is #CircumferenceCircle(radius)#
  </CFOUTPUT>

Parameters:

Name Description Required
radius 1/2 the diameter of the circle. Yes

Full UDF Source:

view plain print about
<cfscript>
/**
 * Calculates the circumference of a circle
 * 
 * @param radius      1/2 the diameter of the circle. 
 * @return Returns a simple value 
 * @author Rob Brooks-Bilson (rbils@amkor.com) 
 * @version 1.0, July 17, 2001 
 */

function CircumferenceCircle(radius)
{
  Return (2*PI()*radius);
}
</cfscript>
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Dave Anderson Dave Anderson added
iniToStruct
20 day(s) ago

Dave Anderson Dave Anderson added
deDupeArray
20 day(s) ago

Richard Richard added
dice
22 day(s) ago

Isaac Dealey Isaac Dealey added
getRelative
a while ago

Top Rated

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

Barney Boisvert indentXml
Rated 5.0, 10 time(s)

Kevin Pepperman generateSsccAsn
Rated 5.0, 4 time(s)

Raymond Camden highlightAndCrop
Rated 5.0, 4 time(s)

Created by Raymond Camden / Design by Justin Johnson