CFLib.org – Common Function Library Project

KilometersToNauticalMiles(kilometers)

Last updated February 24, 2002

author

Tom Nunamaker

Version: 1 | Requires: CF5 | Library: MathLib

Description:
Converts kilometers to nautical miles.

Return Values:
Returns a numerical value.

Example:

<CFSET km = 100>
<CFOUTPUT>
Given km = #km#<BR>
#km# kilometer(s) = #KilometersToNauticalMiles(km)# nautical miles. <br>
</CFOUTPUT>

Parameters:

Name Description Required
kilometers The number of kilometers to convert. Yes

Full UDF Source:

/**
 * Convert kilometers to nautical miles.
 * 
 * @param kilometers 	 The number of kilometers to convert. 
 * @return Returns a numerical value. 
 * @author Tom Nunamaker (tom@toshop.com) 
 * @version 1, February 24, 2002 
 */
function KilometersToNauticalMiles(kilometers) {
  // NOTE: 1852 meters has been adopted as the international nautical mile 6076.11549 feet)

  return kilometers / 1.852;
}
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson