Grow by percent - Block - Bug [SOLVED]


#1

Use this template to make awesome bug reports:

Your username: UTheDevHS

What kind of device are you using?: iPad 5th Generation (2017)

1 sentence description of the problem (I was doing _________, and then __________ happened): I was trying to avoid having to use Set Size (Size as a percent) + number

Steps to make the problem happen:

  1. Code something that uses this block
  2. Play the project and trigger the rule that you used the block for
    ….

I expected this to happen: It would scale to 100%

But instead this happened: It wouldn’t scale at all

Here’s some sweet screenshots:

@Ana @Rodrick


#2

You see, you set the size to zero at first. If the size is set to 0 percent, it is invisible. Can something invisible grow? You can set it to 0.1 or even 0.0000001 and it will grow as long as the size is not set to 0 percent.


#3

I will give some examples. Say you set size percent to 1. Then you put grow by 100 percent. The size now is equivalent to 2 percent. Why?

100% of 1 percent is 1 percent

1 percent plus 100% of 1 persent = 2 persent

What if you set the size to 0. Then let it grow by 100 percent.

100% of 0 percent is 0

0 plus 100% of 0 is 0.

That is why the circle did not grow.


#4

That’s true…


#5

Hm yeah.
It’s growing by 5% of 0 if it’s size 0.


#6

Also, remember that grow by percent does not increase linearly.

When you use Set Size (Size as a percent) + number in a loop, the amount it increases each time stays the same (that’s a linear function)

When you use Grow by percent in a loop, the amount it increases each time increases with each loop (that’s a non-linear function)

So even if the starting value wasn’t zero, the 2 methods give very different results…


#7

Yeah. ChickenProductions has explained it pretty well.


#8

*CodingRoyale


#9

I updated the title and moved to Debug my Code


closed #10

archived #11