relund / gMOIP

2D and 3D plots of linear/integer programming models in R
https://relund.github.io/gMOIP/
5 stars 2 forks source link

inHull(): tol argument not taken into account in some cases #5

Closed scottkosty closed 3 years ago

scottkosty commented 3 years ago

I just tested current master (98adb11f). One issue I noticed is that the value of the tol argument to inHull() is not taken into account in some cases. Here is an example:

library("gMOIP")
pt_ <- c(9.01, 9)
v_ <- matrix(c(3,3, 8,8, 9,9),
              byrow = TRUE,
          ncol = 2)
inHull(pts = pt_, vertices = v_, tol = 1e10)

The above returns -1 for me, where I expect it to return 0 since the value for tol is large.

relund commented 3 years ago

I have fixed and updated the function documentation.

scottkosty commented 3 years ago

Thanks for the quick fix!