Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32🞂TFloatPointType

TFloatPoint

2D single-precision floating-point point structure.

Declaration ​

pascal
type
  TFloatPoint = record
    X, Y: TFloat;
  public
    constructor Create(const P: TPoint); overload;
    constructor Create(X, Y: Integer); overload;
    constructor Create(X, Y: Single); overload;

    class operator Equal(const Lhs, Rhs: TFloatPoint): Boolean;
    class operator NotEqual(const Lhs, Rhs: TFloatPoint): Boolean;
    class operator Add(const Lhs, Rhs: TFloatPoint): TFloatPoint;
    class operator Subtract(const Lhs, Rhs: TFloatPoint): TFloatPoint;

    class function Zero: TFloatPoint; static;
    function Distance(const APoint: TFloatPoint): Single;
    function Length: Single;
  end;
  PFloatPoint = ^TFloatPoint;

Description ​

TFloatPoint represents a 2D point using single-precision floating-point coordinates (TFloat).

Fields ​

FieldTypeDescription
XTFloatSingle precision X-coordinate.
YTFloatSingle precision Y-coordinate.
TypeDeclarationDescription
PFloatPoint^TFloatPointPointer to a TFloatPoint record.
TFloatPointArrayarray [0..0] of TFloatPointStatic un-sized array type.
PFloatPointArray^TFloatPointArrayPointer to an un-sized array of TFloatPoint records.
TArrayOfFloatPointarray of TFloatPointDynamic array of TFloatPoint records; A polyline/polygon.
TArrayOfArrayOfFloatPointarray of TArrayOfFloatPoint2D dynamic array of TFloatPoint records; A poly-polyline/poly-polygon;