7 template <
typename TType>
33 if (other.
x == 0 || other.
y == 0 || other.
z == 0)
34 throw std::invalid_argument(
"Division by zero: denominator has a zero component");
41 return (
x == other.
x) && (
y == other.
y) && (
z == other.
z);
46 return !(*
this == other);
69 return sqrt(
x *
x +
y *
y +
z *
z);
77 throw std::invalid_argument(
"Cannot normalized zero vector");
84 return (
x *
x +
y *
y +
z *
z);
89 return (
x * other.
x +
y * other.
y +
z * other.
z);
102 y * other.
z -
z * other.
y,
z * other.
x -
x * other.
z,
x * other.
y -
y * other.
x);
IVector3 & operator+=(const IVector3 &other)
IVector3 operator+(const IVector3 &other) const
IVector3 operator-(const IVector3 &other) const
IVector3< TType > normalize()
IVector3 operator*(const IVector3 &other) const
IVector3(TType x, TType y, TType z)
IVector3 cross(const IVector3 &other) const
IVector3 operator/(const IVector3 &other) const
bool operator==(const IVector3 &other) const
float dot(const IVector3 &other)
IVector3 & operator-=(const IVector3 &other)
bool operator!=(const IVector3 &other) const