fixed binning code, now correctly uses float->uint32 conversion with towards zero rounding