Page 1 of 1

Bug? Paradox? can someone please explain?

PostPosted: Sat Apr 08, 2017 5:14 pm
by Marcello
Please see attached image and tell me what I'm doing wrong

Thanks

Re: Bug? Paradox? can someone please explain?

PostPosted: Tue Apr 18, 2017 1:25 pm
by Konstantin.Toporov
I guess, it is a round error.
The difference between 2 doubles can be a very small double number but not exactly 0.
So in this case I would recommend to use:
Code: Select all
math.abs(triangle.ab - triangle.bc) < 1e-6

instead of direct comparison with 0.

Re: Bug? Paradox? can someone please explain?

PostPosted: Tue Apr 25, 2017 6:03 pm
by Marcello
Thanks for the tip!!