Datasheet
cosE3
505
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
function cosE3(angle_deg : word): integer;
Returns The function returns the cosine of input parameter.
Description
The function calculates cosine multiplied by 1000 and rounded to the nearest integer:
-
result := round(cos(angle_deg)*1000)
Parameters:
-
angle_deg: input angle in degrees
Note: Return value range: -1000..1000.
Requires Nothing.
Example
var res: integer;
...
res := cosE3(196); // result is -193