Atn: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
No edit summary
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''This function is for BASIC compatibility. It is not available in pure JavaScript projects.''
Atn(''number'')
Atn(''number'')


Line 6: Line 8:


To convert degrees to radians, multiply degrees by π/180. To convert radians to degrees, multiply radians by 180/π.
To convert degrees to radians, multiply degrees by π/180. To convert radians to degrees, multiply radians by 180/π.
== Example ==
<pre>Atn(''number'')
== Description ==
Atn returns the arctangent of a number in radians. The required parameter, ''number'', is any numeric expression.
To convert degrees to radians, multiply degrees by p/180. To convert radians to degrees, multiply radians by 180/p.


== Example (BASIC) ==
== Example (BASIC) ==
Line 26: Line 18:
Pi = Atn(1) * 4
Pi = Atn(1) * 4
Print "The value of pi is " & Pi
Print "The value of pi is " & Pi
</pre>
== Example (JavaScript) ==
<pre>
//Atn Example
//Atn calculates the arctangent of a number
var  Pi;
Pi = Math.atan(1) * 4;
NSB.Print(("The value of pi is ")  +  (Pi));
</pre>
</pre>


Line 41: Line 23:


<pre>
<pre>
The value of pi is 3.141593
The value of pi is 3.141592653589793
</pre>
</pre>


Line 52: Line 34:
[[Category:Math]]
[[Category:Math]]


Rem Atn Example
[[Category:BASIC Functions]]
'Atn calculates the arctangent of a number
Dim Pi
Pi = Atn(1) * 4
Print "The value of pi is " & Pi
</pre>
 
== Output ==
 
<pre>
The value of pi is 3.141593
</pre>
 
== Related Items ==
 
[[cos|Cos]], [[sin|Sin]], [[tan|Tan]]
 
[[Category:Language Reference]]
 
[[Category:Math]]

Latest revision as of 15:19, 25 March 2019

This function is for BASIC compatibility. It is not available in pure JavaScript projects.

Atn(number)

Description

Atn returns the arctangent of a number in radians. The required parameter, number, is any numeric expression.

To convert degrees to radians, multiply degrees by π/180. To convert radians to degrees, multiply radians by 180/π.

Example (BASIC)

Rem Atn Example
'Atn calculates the arctangent of a number

Dim Pi
Pi = Atn(1) * 4
Print "The value of pi is " & Pi

Output

The value of pi is 3.141592653589793

Related Items

Cos, Sin, Tan