SourceForge has been redesigned. Learn more.
Close

#9 avoid division by zero

closed-duplicate
nobody
None
5
2010-02-01
2010-01-30
Lars
No

Hi,
the function "point_inside" raises a DivideByZero exception for triangles, that are _almost_ invalid (e.g. three points in a line).

The attached patch replaces the division with alternative operations. The output of the function is not changed.

regards,
Lars

Discussion

  • Lars

    Lars - 2010-01-30

    replace division with equivalent operations

     
  • Lars

    Lars - 2010-01-30

    sorry - I was hitting "refresh" in my browser - just close this patch

    Lars

     
  • Lode Leroy

    Lode Leroy - 2010-02-01
    • status: open --> closed-duplicate
     

Log in to post a comment.