void CreateSineLookup()
{
float inc = 360/MAX_LOOKUP;
float x=0;
for(int i=0; i = sin(x*deg2rad);
x += inc;
}
}
float l_sin(float num)
{
int t_num = (int)num;
int d_num = num-t_num;
double ans;
ans = sinlookup[t_num] + ((sinlookup[t_num+1]-sinlookup[t_num]) * d_num);
return ans;
}
MAX_LOOKUP is 360. l_sin() is the new sine function.
the problem is that the framerate is actually worse than when i just used sin(), and it produces a screwed up result, too! i''m probably just missing something obvious, and need fresh eyes to peruse the code. thanks
_________________Gecko___