fixed rounding error dividing two ints where the first one is smaller than the last one will always return 0. e.g. 9/18 = 0 and not 0.5 so you need to cast to double or float which i did by multiplying with 1.0 which is not the best code style