This is 1000% it.

Omg, thank you.

I always thought maths was my strong suit, but I’m really struggling to understand it.

We are dividing and finding a percent of the input of the array index. Which is 0 through 9.

On the first loop it’s zero, divide by 5 = 0 and 0 % 5 is 0

second loop, is one which be 0.2 and 0.05

etc

Division

Now it gets interesting at loop 5 as it’s now equal to one, so it places its self on the next row. The division of rows makes perfect sense. (Assuming anything under 1 just immediately gets rounded to row 0.)

So all the decimals are ignored as the uniform grid works in integer, they are slotted into row 0 until 1 is hit, and then slots it into row 1.

The percent

It’s bizarre as it just steadily climbs to 0.45 from 0, 0.05 at a time.

But when printed shows as 0,1,2,3,4 ??? as its dealing with integers again it should all come back as 0 no?

I guess I can’t see the relation between my terrible maths and how unreal interprets percent compared to division.

0 % of 5 is 0.05, 1% is 0.1, 2% is 0.15, 3% is 0.2, 4% is 0.25, 5% is 0.3 etc.

If the decimals are equally ignored, even then it doesn’t make sense,

this rounds to 0array input=0 output. Makes sense

1 array input = 1 output. Makes sense.

2 array input = 1.5 output? wuh unreal reads as 2?!

3 array input = 2 output unreal reads as 3?!

4 array input = 2.5? wot in tarnation reads as 4?

All the items are in the correct order, so it can’t thatch them.

Etc

And if the division and % numbers don’t match, it causes all manner of issues.

Yikes, I need to shower on this.

Any help understanding how it works the maths out or where I’m going wrong would be great.