Sine / cosine / tangent feedback

  1. It’s unclear from the documentation whether the trigonometric functions (sin, cos, tan, etc.) expect degrees or radians.

Screen Shot 2020-04-07 at 8.29.31 AM

  1. After some quick logging, it looks like they use radians, but I don’t see any blocks for getting the value of Pi or converting between degrees and radians. Am I just missing them?

Yep, it’s radians. We don’t have any blocks for going between degrees and radians, but this is something we’ve talked about internally that I would love to get your opinion on! Trig is pretty hard to do in blocks right now.

  1. What trig blocks would you like to see? Lower level ones like the blocks we have or higher level ones like “angle from sprite 1 to sprite 2”
  2. Have you used any other blocks-programming environments with good trig solutions?
  3. Degrees or radians?

Ha! I’m probably not as ideal a source as you might be hoping. I found arcade.makecode about two weeks ago, after needing a break from making programming projects on my own for my kids while they’re out of school. :sweat_smile:

It’s fantastic, by the way. Kudos to you and your team!

  1. What trig blocks would you like to see? Lower level ones like the blocks we have or higher level ones like “angle from sprite 1 to sprite 2”

Low level blocks seem like a must. There will always be something someone wants to do that isn’t directly implemented by an existing block. With function return values coming in the next version, it seems like people will be able to build higher level blocks of their own out of the low level blocks.

If there is already a list of potentially useful high level blocks (your sprite angle example is great), maybe those should go into an extension?

[Are there versioning concerns about you guys releasing something in an extension initially that may be rolled into core functionality later? It seems like that’s a pretty safe path.]

  1. Have you used any other blocks-programming environments with good trig solutions?

No. I’m enjoying the challenge of block programming, but I’m very new to it.

  1. Degrees or radians?

Degrees :100:. I think I could overview the concept of trig functions to my almost 12 year old, using triangles and then vaguely gesture towards a unit circle and explain the relationship to x and y in a 2D coordinate space, but by then we’d be running on fumes, and if I had to explain a new angle measure as well…

But I have no idea how you’d make that breaking change, given that the existing version of the block is already radians.

Again, I know I said it above, but thanks so much for this platform. It’s been a really engaging fun way to get some programming time into my kids’ lives.

1 Like