#ifndef _MYTRIG_H_
#define  _MYTRIG_H_

#include <math.h>

// degrees to radians
#define DEG_TO_RAD(DEG) (((DEG)*(M_PI))/(180))
#define MAX_ANG 90

//table to keep values of cos from 0 to 90º with a 0.1º resolution
// double tablemycos[MAX_ANG * 10 + 1];

// #ifdef _VISION_CPP_

// #else
// extern double tablemycos[];
// #endif

void pop_lookup_table();
/*
================
pop_lookup_table

Populates the lookup table with cos values for the range 0-90º
Other angles (and other trignometric functions) are calculated with angle tranformations
================
*/

double mycos(double deg);
/*
================
mycos

Calculates the cos of an angle on a table-based method
================
*/

double mysin(double deg);
/*
================
mysin

Calculates the sin of an angle on a table-based method
It is used the mycos function with the proper angle transformation
================
*/

double mytan(double deg);
/*
================
mytan

Calculates the tan of an angle on a table-based method
Values used are the ones from mycos with proper angle tranformations
================
*/

#endif
