Original Post
I use a 2d raytracing-like algorithm to determine if and how objects are to be lit and at the start of every ray I call the below function: Might anyone have source code for creating a fast, simple, and inaccurate sin/cos table. I'm horrible at math(And I don't just mean bad, I mean horrendous), and have been unable to implement any of the examples I've come across so far on this site. Also I use radians and not degrees. I know a lot of people will say it's not worth it but if I can even squeeze 2-5 fps out of it I'll be happy. Also if anyone knows a quick and less accurate version of atan2 I'd love to have it as well. Thanks.
[Source]
Point castray(Point src, float angle, float length)
{
Point ray = src;
ray.x += (cos(angle) * length);
ray.y -= (sin(angle) * length);
return ray;
}
[/Source]