Offset integer division fix.

Summary:
This commit fixes integer division rounding towards 0.

May also have to edit the way that is finds the max offsets in the future, as that may not be getting as much of an area with certain offset combinations.

Test Plan: N/A - Just review the code.

Reviewers: jrhodes, buildbot

CC: buildbot

Differential Revision: http://code.redpointsoftware.com.au/D105