Mikroelektronika MIKROE-742 데이터 시트
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
TRIGONOMETRY LIBRARY
The mikroPascal PRO for AVR implements fundamental trigonometry functions. These functions
are implemented as look-up tables. Trigonometry functions are implemented in integer format in
order to save memory.
are implemented as look-up tables. Trigonometry functions are implemented in integer format in
order to save memory.
Library Routines
- sinE3
- cosE3
- cosE3
sinE3
504
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
function sinE3(angle_deg : word): integer;
Returns
The function returns the sine of input parameter.
Description
The function calculates sine multiplied by 1000 and rounded to the nearest integer:
result := round(sin(angle_deg)*1000)
Parameters:
-
angle_deg
: input angle in degrees
Note: Return value range: -
1000..1000
.
Requires
Nothing.
Example
var res : integer;
...
res := sinE3(45); // result is 707
...
res := sinE3(45); // result is 707