cosf cosf (function)

cosf, coss

Computes the cosine of an angle in either floating point or fixed point

Syntax

#include "gu.h"     /* gu.h */
float cosf(float angle);
float coss(unsigned short angle) 

Arguments

angle is the angle in radians. 0-0xffff(0-2 PI) for coss.

Description

sinf uses polynomial approximation to compute the sine in radians. It computes the coss using a table lookup in DRAM, returning the result in s.15 fixed-point format.

Note

In order to maintain the precision, do not specify a large value for the argument of cosf. When the argument is close to the maximum value of the type, 0 is returned.

See Also

sins, sinf, and sqrtf

Revision History

1999/04/30 Changed Format
1999/06/01 Added Note