Re: Line intersection point is wrong
От | Tom Lane |
---|---|
Тема | Re: Line intersection point is wrong |
Дата | |
Msg-id | 9953.1466360251@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Line intersection point is wrong (Emre Hasegeli <emre@hasegeli.com>) |
Ответы |
Re: Line intersection point is wrong
Re: Line intersection point is wrong |
Список | pgsql-bugs |
Emre Hasegeli <emre@hasegeli.com> writes: >> Hm. I don't think I believe the vertical-line cases there either. >> They seem to be assuming A = -1 in a vertical line, which would be >> true if the line was computed by line_construct_pts, but otherwise >> not necessarily. > I think we can just remove those cases. That would be nice. >> Also: your formulation of the general case assumes that >> (l1->A * l2->B - l2->A * l1->B) is not zero, which I'm >> not entirely convinced of. In principle the line_parallel test >> would catch the case, but seeing that that is not exactly how >> line_parallel computes its result, roundoff error could bite us >> here. I wonder if line_interpt_internal should skip the >> line_parallel call and instead do its own tests for zero divide >> to detect parallel lines. > If it would do its own test, the result would be inconsistent with ?# > and ?||. Hmm, well, what if we change line_parallel() so that what it tests is whether (l1->A * l2->B - l2->A * l1->B) is zero? That seems simpler and more symmetric than what it does now. regards, tom lane
В списке pgsql-bugs по дате отправления: