#ifndef PHDMATH_H_INCLUDED
#define PHDMATH_H_INCLUDED

// Angle values
#define PHD_ONE                (65536) // unsigned short int equivalent of 1.0
#define PHD_360                (PHD_ONE)
#define PHD_180                (PHD_ONE/2)
#define PHD_90                (PHD_ONE/4)
#define PHD_45                (PHD_ONE/8)
#define PHD_DEGREE            (PHD_ONE/360)

int phd_atan_tr2(int x, int y);
int phd_cos_tr2(short angle);
int phd_sin_tr2(short angle);
DWORD phd_sqrt_tr2(DWORD n);

#define DISTANCE(x) (x * WALL_L)

#endif