This repository was archived by the owner on Oct 24, 2023. It is now read-only.
This repository was archived by the owner on Oct 24, 2023. It is now read-only.
while loop may never exit (solution would be to check tMaxX, tMaxY,tMaxZ to surpass T1) #2
Open
Description
while (current_X_index != end_X_index || current_Y_index != end_Y_index || current_Z_index != end_Z_index)
if for whatever reason these indexes never happen the loop will hang forever. I am not yet sure why these indexes never happen, it might be because there are off by 1 or perhaps floating errors make them go off by 1.
It might be saver to check for tMaxX, tMaxY, tMaxZ to be smaller than the (real space) line length.
And then the code should go from t0 to t1.
while (tMaxX < RayLength) or (tMaxY < RayLength) or (tMaxZ < RayLength)
This could and would most probably make the code a lot saver.
Metadata
Metadata
Assignees
Labels
No labels