record TPoint2f
Unit
PXL.Types
Declaration
type TPoint2f = record
Description
2D floating-point vector.
Overview
Fields
Methods
Description
Fields
Methods
function Angle: VectorFloat; inline; |
|
Returns an angle (in radians) at which current is pointing at.
|
function Cross(const Point: TPoint2f): VectorFloat; inline; |
|
Calculates a cross product between current and the specified 2D vectors, or analog of thereof.
|
function Distance(const Point: TPoint2f): VectorFloat; inline; |
|
Calculates distance between current and given points.
|
function Dot(const Point: TPoint2f): VectorFloat; inline; |
|
Calculates a dot product between current and the specified 2D vectors. The dot product is an indirect measure of the angle between two vectors.
|
function Empty: Boolean; inline; |
|
Tests whether both X and Y are nearly zero.
|
function InsideTriangle(const Vertex1, Vertex2, Vertex3: TPoint2f): Boolean; |
|
Tests whether current point is inside the triangle specified by given three vertices.
|
function Length: VectorFloat; inline; |
|
Returns the length of current 2D vector.
|
function Lerp(const Point: TPoint2f; const Theta: VectorFloat): TPoint2f; |
|
Interpolates between current and destination 2D 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 Normalize: TPoint2f; |
|
Normalizes current vector to unity length. If the vector is of zero length, it will remain unchanged.
|
function Swap: TPoint2f; inline; |
|
Returns vector with X and Y swapped.
|
Copyright © 2000 - 2017 Yuriy Kotsarenko. Help files generated by PasDoc.
|