math/vector2.bi

Summary
math/vector2.bi
LicenseCopyright © 2007-2014, FreeBASIC Extended Library Development Group
ext.math
Vector2Represents a simple 2 dimensional point of type.
Variables
x
y
Functions
default constructor
component constructor
copy constructor
copy operator let
cast to string operator
Magnitude
Normalize
Normal
Dotvector dot product function
Crossvector cross product function
DistanceReturns the distance between the endpoints of the vector and another.
AngleBetweenReturns the angle between the vector and another.
DistanceReturns the distance between the endpoints of two vectors.
AngleBetweenReturns the angle between two vectors.
global operator - (negate)Returns a * -1.
global operator +Returns a vector whose components are the sum of the corresponding components of two vectors.
global operator +Returns a vector whose components are the sum of the corresponding components of a vector and a scalar.
global operator -Returns a vector whose components are the difference of the corresponding components of two vectors.
global operator -Returns a vector whose components are the difference of the corresponding components of a vector and a scalar.
global operator *Returns a vector whose components are the product of the corresponding components of two vectors.
global operator *Returns a vector whose components are the product of the corresponding components of a vector and a scalar.
global operator /Returns a vector whose components are the quotient of the corresponding components of two vectors.
global operator /Returns a vector whose components are the quotient of the corresponding components of a vector and a scalar.

License

Copyright © 2007-2014, FreeBASIC Extended Library Development Group

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com/p/fb-extended-lib/wiki/License

ext.math

Vector2

Represents a simple 2 dimensional point of type.

Summary
Variables
x
y
Functions
default constructor
component constructor
copy constructor
copy operator let
cast to string operator
Magnitude
Normalize
Normal
Dotvector dot product function
Crossvector cross product function
DistanceReturns the distance between the endpoints of the vector and another.
AngleBetweenReturns the angle between the vector and another.
DistanceReturns the distance between the endpoints of two vectors.
AngleBetweenReturns the angle between two vectors.
global operator - (negate)Returns a * -1.
global operator +Returns a vector whose components are the sum of the corresponding components of two vectors.
global operator +Returns a vector whose components are the sum of the corresponding components of a vector and a scalar.
global operator -Returns a vector whose components are the difference of the corresponding components of two vectors.
global operator -Returns a vector whose components are the difference of the corresponding components of a vector and a scalar.
global operator *Returns a vector whose components are the product of the corresponding components of two vectors.
global operator *Returns a vector whose components are the product of the corresponding components of a vector and a scalar.
global operator /Returns a vector whose components are the quotient of the corresponding components of two vectors.
global operator /Returns a vector whose components are the quotient of the corresponding components of a vector and a scalar.

Variables

x

x as fbext_TypeName(T_)

y

y as fbext_TypeName(T_)

Functions

default constructor

component constructor

copy constructor

copy operator let

cast to string operator

Magnitude

declare const function Magnitude ( ) as double

Normalize

declare sub Normalize ( )

Normal

declare const function Normal () as fbext_Vector2(( T_))

Dot

declare const function Dot (byref v as const fbext_Vector2(( T_))) as double

vector dot product function

Parameters

vsecond vector for dot product operation.

Returns

double precision dot product of vector “this” and vector “v”

Cross

declare const function Cross (
   byref v as const fbext_Vector2(( T_))
) as fbext_Vector2(( T_))

vector cross product function

Parameters

vsecond vector for cross product operation

Returns

cross product of vector “this” and vector “v”

Distance

declare const function Distance (
   byref v as const fbext_Vector2(( T_))
) as double

Returns the distance between the endpoints of the vector and another.

AngleBetween

declare const function AngleBetween (
   byref v as const fbext_Vector2(( T_))
) as double

Returns the angle between the vector and another.

Distance

declare function Distance overload (
   byref a as const fbext_Vector2(( T_)),
   byref b as const fbext_Vector2(( T_))
) as double

Returns the distance between the endpoints of two vectors.

AngleBetween

declare function AngleBetween overload (
   byref a as const fbext_Vector2(( T_)),
   byref b as const fbext_Vector2(( T_))
) as double

Returns the angle between two vectors.

global operator - (negate)

Returns a * -1.

global operator +

Returns a vector whose components are the sum of the corresponding components of two vectors.

global operator +

Returns a vector whose components are the sum of the corresponding components of a vector and a scalar.

global operator -

Returns a vector whose components are the difference of the corresponding components of two vectors.

global operator -

Returns a vector whose components are the difference of the corresponding components of a vector and a scalar.

global operator *

Returns a vector whose components are the product of the corresponding components of two vectors.

global operator *

Returns a vector whose components are the product of the corresponding components of a vector and a scalar.

global operator /

Returns a vector whose components are the quotient of the corresponding components of two vectors.

global operator /

Returns a vector whose components are the quotient of the corresponding components of a vector and a scalar.

x as fbext_TypeName(T_)
y as fbext_TypeName(T_)
declare const function Magnitude ( ) as double
declare sub Normalize ( )
declare const function Normal () as fbext_Vector2(( T_))
declare const function Dot (byref v as const fbext_Vector2(( T_))) as double
vector dot product function
declare const function Cross (
   byref v as const fbext_Vector2(( T_))
) as fbext_Vector2(( T_))
vector cross product function
declare const function Distance (
   byref v as const fbext_Vector2(( T_))
) as double
Returns the distance between the endpoints of the vector and another.
declare const function AngleBetween (
   byref v as const fbext_Vector2(( T_))
) as double
Returns the angle between the vector and another.