Added more structure, added abstraction to existing parts
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
#include "Vector.h"
|
||||
|
||||
Vec3f::Vec3f(float x, float y, float z)
|
||||
{
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
this->z = z;
|
||||
}
|
||||
Vec3f::Vec3f()
|
||||
{
|
||||
this->x = 0;
|
||||
this->y = 0;
|
||||
this->z = 0;
|
||||
}
|
||||
Vec3f::Vec3f(Vec3f &other)
|
||||
{
|
||||
this->x = other.x;
|
||||
this->y = other.y;
|
||||
this->z = other.z;
|
||||
}
|
||||
|
||||
float& Vec3f::operator [](int index)
|
||||
{
|
||||
return v[index];
|
||||
}
|
||||
|
||||
|
||||
|
||||
Vec2f::Vec2f(float x, float y)
|
||||
{
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
}
|
||||
Vec2f::Vec2f()
|
||||
{
|
||||
this->x = 0;
|
||||
this->y = 0;
|
||||
}
|
||||
Vec2f::Vec2f(Vec2f &other)
|
||||
{
|
||||
this->x = other.x;
|
||||
this->y = other.y;
|
||||
}
|
||||
|
||||
float& Vec2f::operator [](int index)
|
||||
{
|
||||
return v[index];
|
||||
}
|
||||
Reference in New Issue
Block a user