24 #ifndef RESOURCES_VECTOR_H
25 #define RESOURCES_VECTOR_H
79 return x == 0.0F &&
y == 0.0F &&
z == 0.0F;
180 return sqrtf(
x *
x +
y *
y +
z *
z);
188 return x *
x +
y *
y +
z *
z;
196 return fabsf(
x) + fabsf(
y) + fabsf(
z);
205 const float len =
length();
206 return Vector(
x / len,
y / len,
z / len);
float squaredLength() const
Vector & operator+=(const Vector &v)
Vector operator/(const float c) const
Vector(const float x0, const float y0, const float z0)
float manhattanLength() const
Vector operator-(const Vector &v) const
Vector operator*(const float c) const
Vector & operator/=(const float c)
Vector & operator=(const Vector &v)
Vector & operator*=(const float c)
Vector normalized() const
Vector & operator-=(const Vector &v)
Vector operator+(const Vector &v) const
#define A_DEFAULT_COPY(func)
std::ostream & operator<<(std::ostream &os, const Vector &v)