# record TPoint2i

 Description Hierarchy Fields Methods Properties

## Declaration

`type TPoint2i = record`

## Description

2D integer vector.

## Overview

### Fields

 `X: VectorInt;` `Y: VectorInt;`

### Methods

 `function Angle: VectorFloat; inline;` `function Cross(const Point: TPoint2i): VectorInt; inline;` `function Distance(const Point: TPoint2i): VectorFloat; inline;` `function Dot(const Point: TPoint2i): VectorInt; inline;` `function Empty: Boolean; inline;` `function InsideTriangle(const Vertex1, Vertex2, Vertex3: TPoint2i): Boolean;` `function Length: VectorFloat; inline;` `function Lerp(const Point: TPoint2i; const Theta: VectorFloat): TPoint2i;` `function Swap: TPoint2i; inline;`

## Description

### Fields

 `X: VectorInt;` The coordinate in 2D space.
 `Y: VectorInt;` The coordinate in 2D space.

### Methods

 `function Angle: VectorFloat; inline;` Returns an angle (in radians) at which the current vector is pointing at.
 `function Cross(const Point: TPoint2i): VectorInt; inline;` Calculates a cross product between current and the specified 2D vector, or analog of thereof.
 `function Distance(const Point: TPoint2i): VectorFloat; inline;` Calculates distance between current and given points.
 `function Dot(const Point: TPoint2i): VectorInt; inline;` Calculates a dot product between current and the specified 2D vector. The dot product is an indirect measure of the angle between two vectors.
 `function Empty: Boolean; inline;` Tests whether both X and Y are zero.
 `function InsideTriangle(const Vertex1, Vertex2, Vertex3: TPoint2i): Boolean;` Tests whether current point is inside the triangle specified by given three vertices.
 `function Length: VectorFloat; inline;` Returns length of current vector.
`function Lerp(const Point: TPoint2i; const Theta: VectorFloat): TPoint2i;`

Interpolates between current and destination 2D integer vectors.

###### Parameters
Point
The destination vector to be used in the interpolation
Theta
The mixture of the two vectors with the a range of [0..1].
 `function Swap: TPoint2i; inline;` Returns vector with X and Y swapped.

Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.