Equality Tolerance Issues

Hi

can someone shed light onto this logic inconsistency?

edit: I already solved by adding a rounding component, as if there is some invisible decimal difference, but why?

debug_dotp.gh (7.6 KB)

Might make sense to change the topic name to ‘Equality logic confusion’ or something similar…

The reference to geometry comes from the weirdest thing: the values comes from normal vectors which belong to parallel planar patches. When I translate them (= no change in normal direction) the result in this check changes randomly from nominal to this issue. Just little nudges in position, and the result (which involves rotation instead) changes

… apparently, those are not truly parallel:


but 10^-15 is indeed practically nothing.

Problem here is you are using the component “Equality” which is absolutely strict.

Do an absolute difference instead, and get you true/false with a “Smaller than” component, this way you can specify what you consider a “zero”.