[Lazarus] ComparePoints func

Sandro Cumerlato sandro.cumerlato at gmail.com
Wed Jul 26 18:48:43 CEST 2017


IMHO you should consider 5 cases: P1 = P2 and the four quadrants

https://en.m.wikipedia.org/wiki/Quadrant_(plane_geometry)

- Quadrant I should correspond to >
- Quadrant III should correspond to <
- What about quadrants II and IV? You could compare your point to Y = -X
line to reduce your study to 3 cases.

Best regards

Sandro Cumerlato


On Jul 26, 2017 6:27 PM, "Alexey via Lazarus" <lazarus at lists.lazarus-ide.org>
wrote:

On 26.07.2017 18:11, Graeme Geldenhuys via Lazarus wrote:

> ComparePoints() returning a Integer is not a very friendly return type
> either,
>

Hm, in my app Int makes sense: i need to compare Points in binary search,
and see: >, <, =.

-- 
Regards,
Alexey


-- 
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170726/1a732e6c/attachment.html>


More information about the Lazarus mailing list