Cos()

Cos() is a fast 16 Bit Integer Cosine function. You must pass an angle in degrees multiplied by 0. The result is a 16 Bit Integer in the range of -32768 to +32767, equivalent to Cosine -1 to +1. The function utilizes the Cordic Algorithm. Syntax: integer = Cos( a as integer )

Example:

  dim angle as byte
  dim result as integer
  angle=23
  result = Cos(angle*10)