Closed frederikrogge closed 1 year ago
Hey, thank you so much for catching these! You're absolutely right and the fixes are great.
I recommend you reinstall RatInABox from 1.x branch as there was another small bug regarding concave environments I caught and fixed as a result of studying yours.
Cheers!
No problem, glad it helped.
Cheers!
Hey, I figured there was a bug with how points are being sampled randomly in non-rectangular environments. First, points were sampled uniformly within the absolute distance between the extents. Therefore, if the extent in x-direction was -2, 4, only points between 0 and 6 were sampled. Secondly, it should be checked whether points are actually within the boundaries of the environment if the environment is not rectangular. However, the last if-statement checked whether it was rectangular. Both bugs should be fixed with this PR. Feel free to have a look, thanks :)