sinf sinf (function)

sinf, sins

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

Syntax

#include "gu.h"     /* gu.h */
float sinf(float angle);
float sins(unsigned short angle)

Arguments

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

Description

sinf uses polynomial approximation to compute the sine in radians. It computes the sine 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 sinf. When the argument is close to the maximum value of the type, 0 is returned.

See Also

coss, cosf, and sqrtf

Revision History

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