math/ vectors.bi

Summary
math/ vectors.bi
LicenseCopyright © 2009, FreeBASIC Extended Library Development Group
ext.math
vector2dSimple 2 dimensional vector.
Variables
x
y
Functions
dotvector dot product function
magnitudevector magnitude function
normalizenormalizes “this” vector
crossvector cross product function
distancevector distance function (euler)
AngleBetweenangle between vectors function
vector3dSimple 3 dimensional vector.
Variables
x
y
z
Functions
dotvector dot product function
magnitudevector magnitude function
normalizenormalizes “this” vector
crossvector cross product function
distancevector distance function (euler)
AngleBetweenangle between vectors function
vector4dSimple 4 dimensional vector.
Variables
x
y
z
w
Functions
dotvector dot product function
magnitudevector magnitude function
normalizenormalizes “this” vector
crossvector cross product function
distancevector distance function (euler)

License

Copyright © 2009, 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

vector2d

Simple 2 dimensional vector.

This class is being deprecated in favor of Vector2.

Summary
Variables
x
y
Functions
dotvector dot product function
magnitudevector magnitude function
normalizenormalizes “this” vector
crossvector cross product function
distancevector distance function (euler)
AngleBetweenangle between vectors function

Variables

x

x as single

y

y as single

Functions

dot

declare function dot (byref v As vector2D) as single

vector dot product function

Parameters

vsecond vector for dot product operation.

Returns

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

magnitude

declare function magnitude() as single

vector magnitude function

Returns

magnitude of “this” vector

normalize

declare sub normalize()

normalizes “this” vector

cross

declare function cross(byref v as vector2d) as vector2d

vector cross product function

Parameters

vsecond vector for cross product operation

Returns

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

distance

declare function distance(byref v as vector2d) as single

vector distance function (euler)

Parameters

vsecond vector for distance operation

Returns

the distance between vector “this” and vector “v”

AngleBetween

declare function AngleBetween(byref v as vector2d) as single

angle between vectors function

Parameters

vsecond vector to find the angle between of.

Returns

the angle (in radians) between vector “this” and vector “v”

vector3d

Simple 3 dimensional vector.

Summary
Variables
x
y
z
Functions
dotvector dot product function
magnitudevector magnitude function
normalizenormalizes “this” vector
crossvector cross product function
distancevector distance function (euler)
AngleBetweenangle between vectors function

Variables

x

x as single

y

y as single

z

z as single

Functions

dot

declare function dot (byref v As vector3D) as single

vector dot product function

Parameters

vsecond vector for dot product operation.

Returns

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

magnitude

declare function magnitude() as single

vector magnitude function

Returns

magnitude of “this” vector

normalize

declare sub normalize()

normalizes “this” vector

cross

declare function cross(byref v as vector3d) as vector3d

vector cross product function

Parameters

vsecond vector for cross product operation

Returns

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

distance

declare function distance(byref v as vector3d) as single

vector distance function (euler)

Parameters

vsecond vector for distance operation

Returns

the distance between vector “this” and vector “v”

AngleBetween

declare function AngleBetween(byref v As vector3d) As single

angle between vectors function

Parameters

vsecond vector for AngleBetween operation

Returns

the angle (in radians) between vector “this” and vector “v”

vector4d

Simple 4 dimensional vector.

Summary
Variables
x
y
z
w
Functions
dotvector dot product function
magnitudevector magnitude function
normalizenormalizes “this” vector
crossvector cross product function
distancevector distance function (euler)

Variables

x

x as single

y

y as single

z

z as single

w

w as single

Functions

dot

declare function dot (byref v As vector4D) as single

vector dot product function

Parameters

vsecond vector for dot product operation.

Returns

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

magnitude

declare function magnitude() as single

vector magnitude function

Returns

magnitude of “this” vector

normalize

declare sub normalize()

normalizes “this” vector

cross

declare function cross(byref v as vector4d) as vector4d

vector cross product function

Parameters

vsecond vector for cross product operation

Returns

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

distance

declare function distance (byref v as vector4d) as single

vector distance function (euler)

Parameters

vsecond vector for distance operation

Returns

the distance between vector “this” and vector “v”

x as single
y as single
declare function dot (byref v As vector2D) as single
vector dot product function
declare function magnitude() as single
vector magnitude function
declare sub normalize()
normalizes “this” vector
declare function cross(byref v as vector2d) as vector2d
vector cross product function
declare function distance(byref v as vector2d) as single
vector distance function (euler)
declare function AngleBetween(byref v as vector2d) as single
angle between vectors function
x as single
y as single
z as single
declare function dot (byref v As vector3D) as single
vector dot product function
declare function magnitude() as single
vector magnitude function
declare sub normalize()
normalizes “this” vector
declare function cross(byref v as vector3d) as vector3d
vector cross product function
declare function distance(byref v as vector3d) as single
vector distance function (euler)
declare function AngleBetween(byref v As vector3d) As single
angle between vectors function
x as single
y as single
z as single
w as single
declare function dot (byref v As vector4D) as single
vector dot product function
declare function magnitude() as single
vector magnitude function
declare sub normalize()
normalizes “this” vector
declare function cross(byref v as vector4d) as vector4d
vector cross product function
declare function distance (byref v as vector4d) as single
vector distance function (euler)
Represents a simple 2 dimensional point of type.