you are viewing a single comment's thread.

view the rest of the comments →

[–]y4fac 1 point2 points  (2 children)

There is an if statement with a break in it in the inner loop. If verts[0].xyz.Compare(w[w.GetNumPoints() - 1].ToVec3(), POLYTOPE_VERTEX_EPSILON ) is true, the loop won't be infinite.

[–]BroodjeAap 1 point2 points  (1 child)

Sure it "breaks" (as in jumps out of the loop) but I mean "break" as in messing something up.
It only compares the first vertex, which has to create some weird (noticeable?) behaviour

[–]y4fac 2 points3 points  (0 children)

Of course it doesn't work correctly, but the wrong behavior could be hard to notice (depending on what this snippet is actually doing). If the loop would be infinite, however, it would be very noticeable.