I was looking for atan2, and found this forum thread that mentions "these hidden blocks can be found with the relabel option of any dyadic arithmetic block". What does that mean, i.e. what do I click to un-hide atan2?
(Also @bh, you explain the arguments are dx, dy for clockwise from 'north/up' vs the traditional, but testing values, I'm pretty sure the implementation is traditional* atan2(y,x), but it just so happens that switching clockwise from north and counter-clockwise from east is effectively the same as swapping x<-->y.)
Recently we've been using it for functions that are useful but are also really important for students to write for themselves, especially ≤, ≥ and min, max. And also for things we don't want to scare beginners away, of which atan2 is an example.
Ah I get it. You didn't mean 'atan2 is normally implemented... but we implemented it... so we could use CW from North'; you meant 'atan2 is what it is. In the example I just gave I put x/y instead of y/x because Snap! uses CW from North'.
I've been testing, and relabeling shows up in a lot of useful places -- even with custom blocks (that have comparable argument lists)!
Yeah, I think the theory is that if you were using plain atan you'd (elsewhere) use y/x and so that's why they used the otherwise confusing order of arguments (y,x), to agree with that. So for us it's atan(x/y) and atan2(x,y).