Calculates the sine of an angle.
A number; the sine of the angle number.
Sin(number)
| Parameter | Description |
|---|---|
| number |
Angle, in radians. To convert an angle from degrees to radians, use the PI function to multiply the degrees by pi/180. |
<h3>Sin Example</h3>
<!--- output its Sin value --->
<cfif IsDefined("FORM.SinNum")>
<cfif IsNumeric(FORM.SinNum)>
Sin(<cfoutput>#FORM.SinNum#</cfoutput>) =
<cfoutput>#Sin(FORM.sinNum)# Degrees =
#Evaluate(Sin(FORM.sinNum) * PI()/180)# Radians
</cfoutput>
<cfelse>
<!--- if it is empty, output an error message --->
<h4>Please enter an angle for which you want the Sine value</h4>
</cfif>
</cfif>
<form action = "sin.cfm">
<p>Type in a number to get its sine in Radians and Degrees
<br><input type = "Text" name = "sinNum" size = "25">
<p><input type = "Submit" name = ""> <input type = "RESET">
</form>
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6
Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/functions-pt282.htm