leopard icon indicating copy to clipboard operation
leopard copied to clipboard

Angles don't match Scratch

Open PullJosh opened this issue 4 years ago • 2 comments

Haven't looked into it closely, but this project works differently after being converted to scratch-js: https://scratch.mit.edu/projects/387687601/

Could also be an sb-edit issue. Not sure.

(Thanks to TheGoldstar16 for reporting!)

PullJosh avatar Apr 25 '20 04:04 PullJosh

I did some investigating and it looks like scratchToRad calls scratchToDeg, which incorrectly adds 90 to the input.

In Scratch, the sine of 90 degrees (forwards) is 1, and the cosine of 90 degrees is 0, which is unintuitive if you're used to trigonometry, but that's Scratch for you.

How do you feel about removing degToScratch and scratchToDeg entirely (and possibly degToRad and radToDeg as well) and just having scratchToRad and radToScratch?

adroitwhiz avatar Jul 18 '22 20:07 adroitwhiz

Actually, it looks like sb-edit should be generating radToDeg instead of radToScratch. Is the version used on the Leopard website up-to-date?

adroitwhiz avatar Jul 19 '22 00:07 adroitwhiz