1

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

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

P#16164 2015-11-03 09:51 ( Edited 2015-12-06 20:47)

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 ▽ | No License

P#16165 2015-11-03 09:59 ( Edited 2015-11-03 15:39)

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

P#16178 2015-11-03 13:34 ( Edited 2015-11-03 18:34)

> cardinal sin

wakawaka

(just in case anyone missed that)

P#16180 2015-11-03 14:19 ( Edited 2015-11-03 19:19)

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

P#16272 2015-11-05 11:02 ( Edited 2015-11-05 16:02)

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

P#16304 2015-11-06 08:50 ( Edited 2015-11-06 13:50)

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.

P#17510 2015-12-05 08:42 ( Edited 2015-12-05 13:42)

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.

P#17543 2015-12-05 21:31 ( Edited 2015-12-06 02:31)

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.

P#17558 2015-12-06 15:47 ( Edited 2015-12-06 20:47)