342
Atn
Description
Returns the arctangent of a number. The arctangent is the angle whose tangent is
number.
Category
Mathematical functions
Atn(number)
Syntax
See also
Tan, Sin, Cos,
Parameters
Parameter
number
The range of the result is - /2 to /2 radians. To convert degrees to radians, multiply
Usage
degrees by /180. To convert radians to degrees, multiply radians by 180/ .
Example
<!--- This snippet shows how to use Atn --->
<html>
<head>
<title>
Atn Example
</title>
</head>
<body bgcolor = silver>
<H3>Atn Example</H3>
<!--- output its Atn value --->
<cfif IsDefined("FORM.AtnNum")>
<!--- if it is empty, output an error message --->
</cfif>
<form action = "atn.cfm" method = "POST">
<P>Type in a number to get its arctangent in Radians and Degrees
<BR><input type = "Text" name = "atnNum" size = "25">
<P><input type = "Submit" name = ""> <input type = "RESET">
</FORM>
</body>
</html>
Pi
Description
Tangent of an angle
<cfif IsNumeric(FORM.atnNum)>
Atn(<cfoutput>#FORM.atnNum#</cfoutput>) =
<cfoutput>#Atn(FORM.atnNum)# radians =
#Evaluate(Atn(FORM.atnNum * 180/PI())#
Degrees</cfoutput>
<cfelse>
<H4>Please enter a number</H4>
</cfif>
Chapter 3 ColdFusion Functions
Need help?
Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?