Type: Posts; User: Norm
The code is using int arithmetic: 5/10 = 0 vs 5.0/10 = 0.5 Use some double values in divisions