On 2017-07-26 17:27, Alexey via Lazarus wrote:
Hm, in my app Int makes sense: i need to compare Points in binary
search, and see: >, <, =.

Ever heard of Manhatten Length? That would be a more logical approach. It is a commonly used length calculation for points.

  http://en.wikipedia.org/wiki/Taxicab_geometry


The interface as in fpGUI's TfpgPoint:


https://github.com/graemeg/fpGUI/blob/develop/src/corelib/fpg_base.pas#L164..L165


The implementations:


https://github.com/graemeg/fpGUI/blob/develop/src/corelib/fpg_base.pas#L2021..L2029



Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
Lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to