Kyotaro HORIGUCHI <> writes:
> I happend to see a strange geometric calcualtion on master/HEAD.
> ...
> Instead, calculating inner product of the two direction vectors
> works as expected.
>   (l1->A * l2->A) + (l1->B * l2->B) == 0

This seems to be a strict subset of the changes in Emre Hasgeli's
latest geometric-types patch.  I'm disinclined to commit it unless
that patch gets rejected, as it'll just require Emre to rebase again.

However, for either patch, I'm a bit concerned about using FPzero()
on the inner product result.  To the extent that the EPSILON bound
has any useful meaning at all, it needs to mean a maximum difference
between two coordinate values.  The inner product has units of coordinates
squared, so it seems like EPSILON isn't an appropriate threshold there.

Possibly this objection is pointless, because I'm not at all sure that
the existing code is careful about how it uses FPeq/FPzero; perhaps
we're applying EPSILON to all manner of numbers that don't have units
of the coordinate space.  But this won't help make it better.

                        regards, tom lane

Reply via email to