Asin - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

ASin

Description
Determines the arcsine of a number. The arcsine is the angle whose sine is number.
Returns
The arcsine, in radians, of a number.
Category
Mathematical functions
Function syntax
ASin(number)
See also
Sin, Cos, ACos, Tan, Atn,
Parameters
Parameter
number
Usage
The range of the result is - /2 to /2 radians. To convert degrees to radians, multiply degrees by
/180. To convert radians to degrees, multiply radians by 180/ .
Example
<h3>ASin Example</h3>
<!--- output its arcsine value --->
<cfif IsDefined("FORM.SinNum")>
<cfif IsNumeric(FORM.SinNum)>
<cfif FORM.SinNum LESS THAN OR EQUAL TO 1>
<cfif FORM.SinNum GREATER THAN OR EQUAL TO -1>
ASin(<cfoutput>#FORM.SinNum#</cfoutput>) =
<cfoutput>#Evaluate(ASin(FORM.sinNum))# Radians</cfoutput>
<br> or <br>ASin(<cfoutput>#FORM.SinNum#</cfoutput>) =
<cfoutput>
#Evaluate(ASin(FORM.sinNum) * 180/Pi())# Degrees
</cfoutput>
<cfelse>
<!--- if it is less than negative one, output an error message --->
<h4>Enter the sine of the angle to calculate, in degrees and radians.
The value must be between 1 and -1, inclusive.</h4>
</cfif>
<cfelse>
<!--- if it is greater than one, output an error message --->
<h4>Enter the sine of the angle to calculate, in degrees and radians. The
value must be between 1 and -1, inclusive.</h4>
</cfif>
<cfelse>
<!--- if it is empty, output an error message --->
<h4>Enter the sine of the angle to calculate, in degrees and radians. The
value must be between 1 and -1,inclusive.</h4>
</cfif>
</cfif>
<form action = "asin.cfm">
<p>Enter a number to get its arcsine in Radians and Degrees.
396
Chapter 3: ColdFusion Functions
Pi
Description
Sine of an angle. The value must be between -1 and 1, inclusive.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents