module charge.math.vector
Math

Source file for Vector3f.

Code Map

//! Source file for Vector3f.
module charge.math.vector;


//! Vector in a 3D space. Charge follows the OpenGL convetion for axis so
//! Y+ is up, X+ is right and Z- is forward.
struct Vector3f
{
public:
	x: f32;
	y: f32;
	z: f32;
	global Up: Vector3f;
	global Forward: Vector3f;
	global Left: Vector3f;


public:
	fn ptr() f32* { }
	fn opAdd(pos: Point3f) Point3f { }
	fn opAdd(vec: Vector3f) Vector3f { }
	fn opAddAssign(vec: Vector3f) { }
	fn opAddAssign(v: f32) { }
	fn opSub(vec: Vector3f) Vector3f { }
	fn opSubAssign(vec: Vector3f) { }
	fn opSubAssign(v: f32) { }
	fn opNeg() Vector3f { }
	fn opMul(vec: Vector3f) Vector3f { }
	fn opMul(val: f32) Vector3f { }
	fn scale(val: f32) { }
	fn floor() { }
	fn normalize() { }
	fn length() f32 { }
	fn lengthSqrd() f32 { }
	fn dot(vec: Vector3f) f32 { }
	fn toString() string { }


public:
	static fn opCall(x: f32, y: f32, z: f32) Vector3f { }
	static fn opCall(pos: Point3f) Vector3f { }
	static fn opCall(vec: f32[3]) Vector3f { }
	static fn opCall(vec: f32[4]) Vector3f { }
}

//! Vector in a 3D space. Charge follows the OpenGL convetion for axis so
//! Y+ is up, X+ is right and Z- is forward.
struct Vector3d
{
public:
	x: f64;
	y: f64;
	z: f64;
	global Up: Vector3d;
	global Forward: Vector3d;
	global Left: Vector3d;


public:
	fn toString() string { }
}
struct Vector3f

Vector in a 3D space. Charge follows the OpenGL convetion for axis so Y+ is up, X+ is right and Z- is forward.

struct Vector3d

Vector in a 3D space. Charge follows the OpenGL convetion for axis so Y+ is up, X+ is right and Z- is forward.