Log In  


where is it ? I'm stumped. and a little angry.
<- that's really my face right now.



function tan(a) return sin(a)/cos(a) end

You can probably just use this:

function tan(x) return sin(x) / cos(x) end

← that’s not really my face


thanks, I know that. more tokens, more cycles.


Maybe there is another way around? Game programmers almost never need tan() in real life, so if you were to show some of the code around where you use it, someone may help simplify it?


thanks samhocevar, but it's not about that, I don't need it that bad. sin/cos will do.

but, you know, cos(x) is just sin(x+0.25)(*). so let's ditch cos.
who needs tan(), ceil() and round()? who needs standards anyway?
good riddance, we need room for... for what exactly?

that's not clean. on purpose. why the hatred for math?

(*) wait, no, btw, sin is inverted for some silly reason.


"so let's ditch cos. who needs tan(), ceil() and round()"

In all seriousness, I've wondered the same thing. :p I mean it's not like Pico 8 has hyperbolic trig functions, erf(), or floating point numbers even!

I think it's struck an OK balance between leaving out functions you'll probably never need in a game (like erf), and writing your own trig functions (which is hard).



[Please log in to post a comment]