Click "play" to see what it is. Wat.

@abrugsch, yeah, figured that out. Point is, sin should be brought in line of how it works in other languages, including regular lua as well.

Not only it is non-intuitive (as this example and @abrugsch post had shown), but it also wastes additional 2 tokens (/ 360) per sin call.

Is it a Lua thing or is it pico-8 "feature"?

I can live with that, although I feel a bit uneasy when things are not mathematically correct.

It's nice to be able to get 90 degrees and 45 degrees without needing to use an approximation of pi... Mathematically wrong, but oh so easy.

Pico-8 invented its own sin() and cos() functions because it uses fixed point math instead of floating point math so it needed new ones anyway.

But no, you wouldn't divide by 360, that'd be weird and not at all how it works normally in any other language. Even standard Lua goes from 0 to Tau, not 0 to 360, silly.

[Please log in to post a comment]