Because 5 and 8 are integers so 5 / 8 is zero remainder five hence the answer is 0 it is called integer division. On the other hand n / d is dividing one float by another so you get 0.625
@quark and @Chrisir
Thanks a lot for the explanations. In one of Daniel Shiffman’s videos I noticed that he also used the .0 trick to make it work but I didn’t know why he did that.
The above line was something I started doing in P5 which worked fine, but in Processing it didn’t and I couldn’t find out why!