ATN

From MCS Wiki AVR
Jump to: navigation, search

Contents

Action

Returns the Arctangent of a floating point variable in radians.


 

 

Syntax

var = ATN( float )

 

 

Remarks

Var

A float variable that is assigned with the arctangent of variable float.

float

The float variable to get the arctangent of.

 

All trig functions work with radians. Use deg2rad and rad2deg to convert between radians and angles.

Floating point variables can be of the single or double data type.

 

See Also

RAD2DEG , DEG2RAD , COS , SIN , TAN , ATN2

 

 

Example


$regfile = "m48def.dat" ' specify the used micro
$crystal = 8000000 ' used crystal frequency
$baud = 19200 ' use baud rate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
 
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
 
 
Dim S As Single , X As Single
S = Atn(1) * 4
Print S ' prints 3.141593 PI
End

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language