Reverted 37191471f712c1f9ed05140c6f42a4a2eb200d1b

Doubles are converted to integers anyway. You can't have a for loop going only half way.