Hemlos:
This Vector lib can be used for 2d or 3d.The vector is treated as an object, hence OOP style.It transforms, or analises the vectors as an object.All known, fundamental, vector functions should be found in this lib, if there is something missing please let me know.This lib is very stable and tested using Sir Isaac Newton's law of universal gravitation. (in my yet to be revealed game) =D

Notes about normalizing:A. ||V|| = 1 (it should anyway, if not let me know how!)B. Can be used to set the absolute length. eg. instead of using a second SCALAR. saves some CPU steps!

VEC3:

--- Code: GLBasic ---// --------------------------------- //// Project: Vector Object - OOP// Start: Saturday, August 29, 2015// Created By: Neil M. Silver// Code based on the works done by BigSofty and Jestermon.//// ======================================================================================== //// Vector Object - OOP//// This is a Vector Library, true OOP style.// The Vector object can be analised, or transformed with vector math functions.//// Note:// Declare your vectors ahead of time AS VEC3.// Your main vector is the main object(VecA), and you pass in secondary vectors(VecB) as inputs.// VecB as an input is always the OTHER secondary vector being analised.// CrossProduct function outputs VectorOutput AS Vec3 as the output, to preserve the first vector.//// LOCAL My3dVector AS VEC3// My3dVector._INIT_(1.0,1.0,1.0) //not a normalized vector.// My3dVector._NORMALIZE() //My3dVector length is now normalized to 1 which preserves its original direction, eg ||V|| = 1// My3dVector._SCALE(2.0) // vector is now length = 2, in its original direction.//// LOCAL My3dVector2 AS VEC3// My3dVector2._INIT_(3.0,-1.0,-2.0) //not a normalized vector.// LOCAL MyProductOutputVector AS VEC3 // no need to init this one...itll be used for the product results.// My3dVector._CROSSPRODUCT(My3dVector2, MyProductOutputVector ) //MyProductOutputVector contains the results of this function byref.//TYPE VEC3 // 3 dimensional Vector Object