You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have done some check ,found that if x , y exactly to be 3.0,5.0 and testSize to be 0.4, the hit is not detected, but put a little diff to these vars, it occurred . so i guess it is the float error problem:
here output.distance (4.76837158E-7)is exactly 4 times of FLT_EPSILON(1.1920929E-7)
so i think the minimal distance error the algorithm produce is not simply the float epsilon,maybe 4 times of that ?
really hard to locate this , i went along my code and libgdx binding and finally here
The text was updated successfully, but these errors were encountered:
Thanks for the report. This is a troublesome configuration for the distance algorithm. Nevertheless, I found a way to improve the accuracy. I'm also changing the overlap function to use a tolerance so that small distances are considered overlap.
this is the how to reproduce the situation
environment:
I have done some check ,found that if x , y exactly to be 3.0,5.0 and testSize to be 0.4, the hit is not detected, but put a little diff to these vars, it occurred . so i guess it is the float error problem:
and i found these:
src/distance.c:519
here
output.distance
(4.76837158E-7)is exactly 4 times of FLT_EPSILON(1.1920929E-7)so i think the minimal distance error the algorithm produce is not simply the float epsilon,maybe 4 times of that ?
really hard to locate this , i went along my code and libgdx binding and finally here
The text was updated successfully, but these errors were encountered: