ATN

From C64-Wiki
Jump to: navigation, search
BASIC keyword
Keyword: ATN
Abbreviation: A Shift+T
Type: Function
Token code: 192/$C1
Handling routine
in BASIC ROM:
58126–58234
$E30E–E37A
List of all BASIC keywords


Remark: This article describes the BASIC-Command ATN in BASIC V2 at the Commodore 64.

Type: Numeric Function
General Programming-Syntax: ATN(<numeric-expression>)

ATN is a mathematical function that returns the arc tangent of a numeric value. The argument value is regarded as radians; to convert degrees into radians, enter the formula (deg*π/180) where deg is the angle in degrees.

If the argument does not evaluate to a numeric value then you get a BASIC-error ?TYPE MISMATCH ERROR IN line. It can only be used with values from -1e+38 to 1e+38. If the argument is out of range the BASIC error?OVERFLOW ERROR IN line is shown. When the numeric argument is absent, it displays a ?SYNTAX ERROR IN line.

Examples[edit]

PRINT ATN(1) Screen: 0.785398163
BASIC V2.0 (second release) Commands

ABS | AND | ASC | ATN | CHR$ | CLOSE | CLR | CMD | CONT | COS | DATA | DEF | DIM | END | EXP | FN | FOR | FRE | GET | GET# | GOSUB | GOTO | IF | INPUT | INPUT# | INT | LEFT$ | LEN | LET | LIST | LOAD | LOG | MID$ | NEW | NEXT | NOT | ON | OPEN | OR | PEEK | POKE | POS | PRINT | PRINT# | READ | REM | RESTORE | RETURN | RIGHT$ | RND | RUN | SAVE | SGN | SIN | SPC | SQR | STATUS/ST | STEP | STOP | STR$ | SYS | TAB | TAN | THEN | TIME/TI | TIME$/TI$ | TO | USR | VAL | VERIFY | WAIT