Integer Division not working?

   417   1   1
User Avatar
Member
385 posts
Joined: July 2018
Offline
This is really weird but it must be something so obvious that i cant see.

left column holds arrays of integers.
right column is the division : min(array)/max(array)

how can it be that the division is not correct?? its like magic, like a secret rounding happening 2/3 = 1 instead of 0.66

the division attribute is a float
and the array elements are integers.


oh and by the way you ll see its written max/min
thats because min/max equals 0.0 for some reason
Edited by papsphilip - Nov. 7, 2019 14:30:12

Attachments:
Capture.JPG (18.7 KB)
1.JPG (10.5 KB)

User Avatar
Member
385 posts
Joined: July 2018
Offline
ok false alarm.
if anyone gets here for the same reason, i had to cast the division

f@sag = (float) min/max;

everything works now
saul good
Edited by papsphilip - Nov. 7, 2019 14:44:12
  • Quick Links