#include <StdAfx.h>
#include "phd_math.h"
#include <trng_core.h>

extern TYPE_phd_atan phd_atan;
extern TYPE_phd_sqrt phd_sqrt;

int phd_atan_tr2(int x, int y) {
    return phd_atan(x, y);
}

int phd_cos_tr2(short angle) {
    return 4 * phd_cos_table[angle >> 3 & 0x1FFE];
}

int phd_sin_tr2(short angle) {
    return 4 * phd_sin_table[angle >> 3 & 0x1FFE];
}

DWORD phd_sqrt_tr2(DWORD n) {
    return phd_sqrt(n);
}