Difference between i/10*10 and i?

These are two codes, that should have the exact same result, but don’t… why?

 for (int i = 0; i < vectors.length; i++) {
   vectors[i] = new PVector(i%10*10 + 50, i/10*10); 
 }

 for (int i = 0; i < vectors.length; i++) {
   vectors[i] = new PVector(i%10*10 + 50, i); 
 }

Where is the difference? Can someone explain to me, why the first creates a “cursiv” grid, while the second one a normal one?

try:

for (int i = 0; i < 20; i++) {
  println("i: "+i+" i/10*10: "+(i/10*10));
// or
//  println("i: "+nf(i,2)+" i/10*10: "+nf((i/10*10),2)+" i/10.0*10: "+nf((i/10.0*10),3,1));

}

Well, i actually already set up a grid system with these loops, so i know the different results they produce, but it just didn’t make any sense, thats why i asked :sweat_smile:

Thanks^^ didn’t know it wouldn’t convert that automatically, though now it makes sense :sweat_smile:
Problematic if you don’t know it, but quite useful if you do :blush: