Added a constructor that will accept a pointer to a float array.
This commit is contained in:
parent
bbc914109f
commit
4c7ddc0cba
|
@ -42,6 +42,10 @@ namespace cAudio
|
|||
{
|
||||
}
|
||||
|
||||
cVector3(float* vector) : x(vector[0]), y(vector[1]), z(vector[2])
|
||||
{
|
||||
}
|
||||
|
||||
cVector3 operator-() const { return cVector3(-x, -y, -z); }
|
||||
cVector3& operator=(const cVector3& other) { x = other.x; y = other.y; z = other.z; return *this; }
|
||||
cVector3 operator+(const cVector3& other) const { return cVector3(x + other.x, y + other.y, z + other.z); }
|
||||
|
|
Loading…
Reference in New Issue