276
CFML Language Reference
ASin
Returns the arcsine of a number in radians. The arcsine is the angle whose sine is
number.
See also
Sin
,
Cos
,
Pi
,
and
Tan
.
Syntax
ASin
(
number)
number
Sine of the angle that is to be calculated. This value must be between 1 and -1.
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/
π
.
Examples
<!--- This example shows how to use ASin --->
<HTML>
<HEAD>
<TITLE>ASin Example</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<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>Please enter the sine of the angle that is to be
calculated in degrees and radians. This value must be between 1 and -1,
inclusive.</H4>
</CFIF>
<CFELSE>
<!--- if it is greater than one, output an error message --->
<H4>Please enter the sine of the angle that is to be calculated in
degrees and radians. This value must be between 1 and -1, inclusive.</H4>
</CFIF>
<CFELSE>
<!--- if it is empty, output an error message --->
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...