Cot(x)
Last updated October 9, 2001
Version: 1 | Requires: ColdFusion 5 | Library: MathLib
Description:
Returns the Cotangent of an angle. If angle is 0, returns "undefined". All angles are expressed in radians.
Return Values:
Returns a numeric value or string.
Example:
<CFOUTPUT>
Given x=1<BR>
The cotangent of #x# radians is: #Cot(x)#.
</CFOUTPUT>
Parameters:
| Name | Description | Required |
|---|---|---|
| x | Any angle in radians. | Yes |
Full UDF Source:
<cfscript>
/**
* Returns the Cotangent of an angle.
*
* @param x Any angle in radians.
* @return Returns a numeric value or string.
* @author Rob Brooks-Bilson (rbils@amkor.com)
* @version 1, October 9, 2001
*/
function Cot(x){
if (x EQ 0)
return "undefined";
else
return 1/Tan(x);
}
</cfscript>
Search CFLib.org
Latest Additions
Dave Anderson added
iniToStruct
20 day(s) ago
Dave Anderson added
deDupeArray
20 day(s) ago
Richard added
dice
22 day(s) ago
Isaac Dealey added
getRelative
a while ago
Top Rated
backupDatabase
Rated 5.0, 22 time(s)
indentXml
Rated 5.0, 10 time(s)
generateSsccAsn
Rated 5.0, 4 time(s)
highlightAndCrop
Rated 5.0, 4 time(s)