Add round to the sqrt of block

Story :slight_smile:
I'm loving the addition of new blocks without cluttering the category pane using the relabel option

But I wanted to negate a value and I remembered there was a new neg block so I went to find it

First off, I dragged out round and tried relabelling but it has no relabel option

So then I thought, maybe it was introduced into a library - searched them - didn't find it.

Searched forum - couldn't find reference to it

Started to question my sanity :slight_smile:

Did I just dream it? :slight_smile:

Then I looked at the operator blocks and realised that it was in the sqrt of block

So, I thought - lets ask for round to have relabel options for all the (is monadic the word?) operators

Bu then I realised that this was a lot of work and unnecessary duplication

But could we simply have round added to the sqrt of block and then I/other Snappers can just use one block to rule them all :slight_smile:

Sorry for the shaggy dog story but wanted to show why I was asking :slight_smile:

There are a bunch of places where blocks could be consolidated. My favorite ones are in the Sounds category, with set [instrument/tempo/volume/balance] to __. Most such cases are historical leftovers from Scratch. I think the underlying issue about ROUND is that someone thought, maybe correctly, that 8-year-olds would find uses for round but not for the transcendental functions or square roots. We've confused that history by adding things like floor, ceiling, neg, and id to the sqrt block; arguably we should have put those in with round. (Especially floor and ceiling, which are variants of round!)

Speaking of confusing the history, our recent invention of using relabel for access to functions we want to pretend we don't have obscures its original purpose for use in debugging, for situations in which you change your mind about which function you need at this point in your code, or situations in which you have to use an almost-the-same rewrite of a chunk of code, but with < instead of > or something. Based on past history, the things like not-equal should be menu options, not hidden in relabel. But we did it as an attempt to have our cake and eat it too about commonly useful functions that are also great programming exercises.

So anyway, maybe someday we'll have a big cleanup of all this, but maybe not.

Did you know that in - very - recent Snap! versions you can now also find blocks by searching for an item in one of their dropdown menus?

neg

I didn't - nice feature :slight_smile:

image

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.