Class: vector3

Vector of 3 floats

Hierarchy

o-+ mathlib
  o-+ vector3

Methods:

Method overview:


new ([vector3 copy]/[float x,y,z]/[table float3])
returns: (vector3 vec)
creates a new vector
add (vector3 result,vector3 a,vector3 b)
returns: (vector3 result)
result = a+b
copy (vector3 to,vector3 from)
returns: ()
copy content
cross (vector3 result,vector3 a,vector3 b)
returns: (vector3 result)
result = a x b CrossProduct
distance (vector3 a,vector3 b)
returns: (float dst)
dst = Distance between a and b
div (vector3 result,vector3 a,vector3 b)
returns: (vector3 result)
result = a/b
dot (vector3 a,vector3 b)
returns: (float flt)
flt = a.b DotProduct
get (vector3 vec)
returns: (float x,y,z)
returns as floats
lerp (vector3 result,vector3 a,vector3 b,float fracc)
returns: (vector3 result)
result = a*(1-fracc)+b*(fracc)
mul (vector3 result,vector3 a,vector3 b)
returns: (vector3 result)
result = a*b
normalize (vector3 a,vector3 b)
returns: (float dst)
a = normalized(b), dst = length of b before normalizing
scale (vector3 result,vector3 a,float scale)
returns: (vector3 result)
result = a*scale
scaledadd (vector3 result,vector3 a,vector3 b,float scale)
returns: (vector3 result)
result = a+ scale*b
set (vector3 vec,float x,y,z)
returns: ()
sets as floats
sqdistance (vector3 a,vector3 b)
returns: (float dst)
dst = squared Distance between a and b
sub (vector3 result,vector3 a,vector3 b)
returns: (vector3 result)
result = a-b
tostring (vector3 vec)
returns: (string str)
prints vector

Inherited Methods: