Sin

Description

Returns the sine of an angle.

Category

Mathematical functions

Syntax


Sin(number) 

See also

ASin, Atn, Cos, Pi, Tan

Parameters

Parameter
Description
number
Angle, in radians, for which you want the sine. If the angle is in degrees, multiply it by PI()/180 to convert it to radians.

Example

<!--- This snippet shows how to use Sin --->

<html>

<head>

<title>

Sin Example

</title>

</head>



<body bgcolor = silver>

<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 Sin value</H4>

  </cfif>

</cfif>



<form action = "sin.cfm" method = "POST">

<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>

</body>

</html> 



Banner.Novgorod.Ru