Type Reference

Type TVector2D 2D vector type

Method SwapComponents() SwapComponents


Method Length:Double() Returns the magnitude of a 2D vector

Accepts a 2D vector of type TVector2D and returns the magnitude



Method ScalarProduct( scalar:Double ) Multiplicates each component with a scalar

Accepts a scalar value



Function Create:TVector2D( x:Double, y:Double ) Creates a new vector

x and y are th ecoordinates of the vector



Function DotProduct:Double( vector1:TVector2D, vector2:TVector2D ) Returns the dot product

Accepts two 2D vectors of type TVector2D and returns the dot product



Function Normalize( vector:TVector2D Var ) Normalizes the vector passed to it.

Accepts a 2D vector of type TVector2D and normalizes it.



Function DistancePoint2Vector:Double( v1:TVector2D, v2:TVector2D, x:Double ,y:Double ) calculates the distance of a point to a vector line

two vectors do describe the line, and a point



Function Copy:TVector2D( _v1:TVector2D ) copies a vector

copies a vector




Type TLine2D 2D Line type

Method Draw() Draws a TLine2D


Method Schnittpunkt( _g:TLine2D, _px# Var, _py# Var ) Calculates the Schnittpunkt between two lines


Function Create:TLine2D( _x:Double, _y:Double, _r:TVector2D ) Creates a new TLine2D

x and y are the coordinates of a point, r is a TVector2D Object




Module Information

Name Vector2D
Description 2D Vector Calculations
License Public Domain
Authors René Aye
CustomAttr See!