Discuss Scratch
- Discussion Forums
- » Suggestions
- » more math blocks.
- JRR078
- Scratcher
56 posts
more math blocks.
I use math blocks a bit. but there aren't blocks like…
(() ^ ())(btw, () ! is take 5! = 5*4*3*2*1=120 (i'm pretty sure.) The ()^() can be replaced with the following:
([cube root v] of (9))
(() !)
define (base) ^ (exponent)IDK about the cuberoot of () and ()!
set [Total v] to [1]
repeat (exponent)
set [Total v] to ((Total) * (base))
end
Last edited by JRR078 (Oct. 30, 2016 20:51:17)
when green flag clicked“Video games are meant to be just one thing: fun. Fun for everyone.” - Satoru Iwata
forever
see [how many times I change my signature v]
end
One day, I will learn the art of correctly using the “quote” section consistently
- TheMonsterOfTheDeep
- Scratcher
1000+ posts
more math blocks.
If we implement the first one, we should not implement the second one, because then it can be workarounded as so:
((base :: grey) ^ ((1) / (3)) :: operators)Also your workaround for exponent will not work for decimal or negative exponents. One that works for decimal exponents (but will break for negative bases) is this:
([e ^ v] of ((exponent :: grey) * ([ln v] of (base :: grey)))Finally, I'm not sure how useful the factorial function is, but I think if it's implemented it should be labelled as factorial but actually call the Gamma function (which basically is factorial that works on decimals / negatives).
my latest extension: 2d vector math
- JRR078
- Scratcher
56 posts
more math blocks.
Ok! makes sense!
when green flag clicked“Video games are meant to be just one thing: fun. Fun for everyone.” - Satoru Iwata
forever
see [how many times I change my signature v]
end
One day, I will learn the art of correctly using the “quote” section consistently
- braxbroscratcher
- Scratcher
1000+ posts
more math blocks.
Cube root is literally a number to the 1/3 power. Already easily workaroundable; no support. I use math blocks a bit. but there aren't blocks like…(() ^ ())(btw, () ! is take 5! = 5*4*3*2*1=120 (i'm pretty sure.) The ()^() can be replaced with the following:
([cube root v] of (9))
(() !)define (base) ^ (exponent)IDK about the cuberoot of () and ()!
set [Total v] to [1]
repeat (exponent)
set [Total v] to ((Total) * (base))
end
My signature is kumquat proof.
But not tangerine pro-
nomnomnomnomnom
- JRR078
- Scratcher
56 posts
more math blocks.
lol the quote
Last edited by JRR078 (Oct. 31, 2016 15:35:22)
when green flag clicked“Video games are meant to be just one thing: fun. Fun for everyone.” - Satoru Iwata
forever
see [how many times I change my signature v]
end
One day, I will learn the art of correctly using the “quote” section consistently
- Discussion Forums
- » Suggestions
- » more math blocks.