mrc-ide / covid-sim

This is the COVID-19 CovidSim microsimulation model developed by the MRC Centre for Global Infectious Disease Analysis hosted at Imperial College, London.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpatialBoundingBox maximums

galactic-src opened this issue · comments

When the SpatialBoundingBox is compared to a point's coordinates, as I understand it, they are compared less than or equal to a lower limit and strictly less than an upper limit. However, to facilitate that, it adds a little delta (1e-6) to create the upper bound when deriving it from density data.

Would the world be simpler if the upper bound was compared less than or equal to and it didn't need to add the delta to support the strict less than?

Happy to look at this if it's considered helpful.

The 1e-6 is just to overcome comparing floating point numbers, with integers. Quite common to see this, as a floating point x <= (int) y doesn't always do what you want.