#include <stdio.h>
#include <math.h>
#include "Fxp.h"
Include dependency graph for Fxp_trig.c:
Go to the source code of this file.
Defines | |
#define | TABLE_SIZE 2048 |
# of elements in trig tables | |
#define | TABLEPOS_TO_ANGLE(n) ((Afxp)((AFXP_MAX*n)/TABLE_SIZE)) |
Converts a table-index to an angle. | |
#define | ANGLE_TO_TABLEPOS(a) (((TABLE_SIZE*(int)a)/AFXP_MAX)%TABLE_SIZE) |
Converts an angle to a table pos. | |
#define | AVERAGE(x, y) ((x+y)/2) |
Returns average of two values. | |
Functions | |
int | FindInTable (Sfxp val, int min, int max, const Sfxp table[TABLE_SIZE]) |
Binary search for specified area, sorted in increasing order. | |
int | FXP_DumpTrig (const char *fname) |
Prints contents of trig tables to a C file. | |
Variables | |
const Sfxp | __SIN_TABLE [] |
Table of sin values vs angle. | |
const Sfxp | __COS_TABLE [] |
Table of cos values vs angle. | |
const Sfxp | __TAN_TABLE [] |
Table of tan values vs angle. |
Definition in file Fxp_trig.c.