Log In  


Cart #16163 | 2015-11-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

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

1


Have you noticed the search textbox on the bbs?

The sin and cos full period for pico-8 is 1, not 2*pi as you might expect. See:

Cart #14870 | 2015-10-02 | Code ▽ | Embed ▽ | No License


Just imagining that in the background everything is multiplied by Tau for your convenience~


> cardinal sin

wakawaka

(just in case anyone missed that)


you want sin(T/360) to get what you're expecting... (I fell foul of this too...)


@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]