Closed Waschina closed 3 years ago
Hi @thomasp85 , I now tested the pull-request changes on different linux and MacOS systems. The particles package compiled and installed without any errors/warnings and the issue #8 is resolved with the changes.
I can't figure out why the automatic checks in github (or better AppVeyor) failed. Is there anything else I need to do or can help with, so that the pull request could be merged into thomasp85:master
?
Best wishes Silvio
This is because I haven't updated particles to a more modern CI setup...
This looks good - Thanks!!
Cause of issue was, that particles that are pulled back into a polygon by
polygon_constraint
receive new coordinates, which are still not recognised as inside the polygon by the functionmgcv::in.out(...)
.Here suggested solution: Introduce a tolerance level (2e-308) of a distance that a particle can be away from the polygon's boundaries. Only particles with a distance larger than this tolerance level are subject for placement updates by the polygon constraint.
The chosen tolerance level is based on R's double precision range.