int groDouPress, topDouPress;

what happens if you change those two to type double?