|
@@ -16,19 +16,19 @@ 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+(ls::math::vector::Vector2 _vector)
|
|
|
|
|
|
+ls::math::vector::Vector2 ls::math::vector::Vector2::operator+(const ls::math::vector::Vector2& _vector)
|
|
{
|
|
{
|
|
- return ls::math::vector::Vector2{this->components[0] + _vector.getX(), this->components[1] + _vector.getY()};
|
|
|
|
|
|
+ return ls::math::vector::Vector2{this->components[0] + _vector.components[0], this->components[1] + _vector.components[1]};
|
|
}
|
|
}
|
|
|
|
|
|
-ls::math::vector::Vector2 ls::math::vector::Vector2::operator-(ls::math::vector::Vector2 _vector)
|
|
|
|
|
|
+ls::math::vector::Vector2 ls::math::vector::Vector2::operator-(const ls::math::vector::Vector2& _vector)
|
|
{
|
|
{
|
|
- return ls::math::vector::Vector2{this->components[0] - _vector.getX(), this->components[1] - _vector.getY()};
|
|
|
|
|
|
+ return ls::math::vector::Vector2{this->components[0] - _vector.components[0], this->components[1] - _vector.components[1]};
|
|
}
|
|
}
|
|
|
|
|
|
-ls::math::core::type::vector_scalar ls::math::vector::Vector2::operator*(ls::math::vector::Vector2 _vector)
|
|
|
|
|
|
+ls::math::core::type::vector_scalar ls::math::vector::Vector2::operator*(const ls::math::vector::Vector2& _vector)
|
|
{
|
|
{
|
|
- return this->components[0] * _vector.getX() + this->components[1] * _vector.getY();
|
|
|
|
|
|
+ return this->components[0] * _vector.components[0] + this->components[1] * _vector.components[1];
|
|
}
|
|
}
|
|
|
|
|
|
ls::math::vector::Vector2 ls::math::vector::Vector2::operator*(double _value)
|
|
ls::math::vector::Vector2 ls::math::vector::Vector2::operator*(double _value)
|