#include <ellalgo/linear_algebra.hpp>
template<typename T>
Vector2 class
Public types
- using value_type = T
Constructors, destructors, conversion operators
Public functions
-
auto operator[](size_
t i) -> T& -
auto operator[](size_
t i) const -> const T& -
auto size() const -> size_
t - auto operator+=(const Vector2& rhs) -> Vector2&
- auto operator-=(const Vector2& rhs) -> Vector2&
- auto operator*=(T scalar) -> Vector2&
- auto dot(const Vector2& other) const -> T
- auto norm() const -> T
Function documentation
template<typename T>
T& Vector2<T>:: operator[](size_ t i)
Parameters | |
---|---|
i | The index of the element to access. |
Returns | A reference to the element at the specified index. |
Provides access to the elements of the Vector2 object.
template<typename T>
const T& Vector2<T>:: operator[](size_ t i) const
Parameters | |
---|---|
i | The index of the element to access. |
Returns | A constant reference to the element at the specified index. |
Provides constant access to the elements of the Vector2 object.