Packed Record TVector2Integer

Unit

Declaration

type TVector2Integer = packed record

Description

Vector of 2 Integer values.

See also
TVector3Integer
Vector of 3 Integer values.

Overview

Nested Types

Public TIndex = 0..1;

Fields

Public X: Integer
Public Y: Integer
Public Data: array [TIndex] of Integer

Methods

Public class operator + (const A, B: TVector2Integer): TVector2Integer; inline;
Public class operator - (const A, B: TVector2Integer): TVector2Integer; inline;
Public class operator - (const V: TVector2Integer): TVector2Integer; inline;
Public function ToString: string;
Public function IsZero: boolean; inline;
Public class function Equals(const V1, V2: TVector2Integer): boolean; static; inline;
Public class function Zero: TVector2Integer; static; inline;

Properties

Public property AsArray [const Index: TIndex]: Integer read GetItems;

Description

Nested Types

Public TIndex = 0..1;

This item has no description.

Fields

Public X: Integer

This item has no description.

Public Y: Integer

This item has no description.

Public Data: array [TIndex] of Integer

This item has no description.

Methods

Public class operator + (const A, B: TVector2Integer): TVector2Integer; inline;

This item has no description.

Public class operator - (const A, B: TVector2Integer): TVector2Integer; inline;

This item has no description.

Public class operator - (const V: TVector2Integer): TVector2Integer; inline;

This item has no description.

Public function ToString: string;

This item has no description.

Public function IsZero: boolean; inline;

This item has no description.

Public class function Equals(const V1, V2: TVector2Integer): boolean; static; inline;

This item has no description.

Public class function Zero: TVector2Integer; static; inline;

This item has no description.

Properties

Public property AsArray [const Index: TIndex]: Integer read GetItems;

Get vector components by index. This is a default property, so you can write MyVector[0] instead of MyVector.Data[0] or MyVector.AsArray[0].

But note that this is not writeable (because exposing writeable properties on vectors would cause some subtle traps, see https://castle-engine.io/coding_traps ). Use MyVector.Data[0] := 123 if you want to set by index, or MyVector.X := 123.


Generated by PasDoc 0.16.0-snapshot.