|
@@ -15,7 +15,7 @@ ls::math::vector::Vector2::Vector2(const ls::math::core::type::vector2_component
|
|
this->components[1] = _y;
|
|
this->components[1] = _y;
|
|
}
|
|
}
|
|
|
|
|
|
-ls::math::vector::Vector2 ls::math::vector::Vector2::operator+(Vector2 _vector)
|
|
|
|
|
|
+ls::math::vector::Vector2 ls::math::vector::Vector2::operator+(ls::math::vector::Vector2 _vector)
|
|
{
|
|
{
|
|
ls::math::vector::Vector2 calculatedVector{0, 0};
|
|
ls::math::vector::Vector2 calculatedVector{0, 0};
|
|
calculatedVector.setX(this->components[0] + _vector.getX());
|
|
calculatedVector.setX(this->components[0] + _vector.getX());
|
|
@@ -47,6 +47,16 @@ ls::math::vector::Vector2 ls::math::vector::Vector2::operator*(double _value)
|
|
return calculatedVector;
|
|
return calculatedVector;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+bool ls::math::vector::Vector2::operator==(const ls::math::vector::Vector2 &_vector)
|
|
|
|
+{
|
|
|
|
+ return this->components[0] == _vector.components[0] && this->components[1] == _vector.components[1];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool ls::math::vector::Vector2::operator!=(const ls::math::vector::Vector2 &_vector)
|
|
|
|
+{
|
|
|
|
+ return this->components[0] != _vector.components[0] || this->components[1] != _vector.components[1];
|
|
|
|
+}
|
|
|
|
+
|
|
ls::math::core::type::vector2_component ls::math::vector::Vector2::getX()
|
|
ls::math::core::type::vector2_component ls::math::vector::Vector2::getX()
|
|
{
|
|
{
|
|
return this->components[0];
|
|
return this->components[0];
|