#include <nitro/fx/fx_trig.h>
fx16 FX_CosIdx( int idx );
The argument equates 1 to the value of 2π radian divided by 65,536. The function returns the result as an fx16 type based on a lookup in an internal
4,096-element table. Be aware that the error will become very large near 0.5π and 1.5π. The argument must take a value between 0 - 65535.
The argument is the of the int type. To make the negative numbers and the numbers larger than 65536 to wrap around to be between 0 and 65536, it needs to be cast explicitly to an u16 type, or be masked by 0xffff.
idx |
The number of units with a value of 2π radian divided by 65536. |
Approximation of the cosine.
FX_SinIdx, FX_SinFx64c, FX_CosFx64c
06/16/2004 Initial Version