mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
small code improvement
This commit is contained in:
@@ -19,7 +19,7 @@ namespace omath
|
|||||||
class Angle
|
class Angle
|
||||||
{
|
{
|
||||||
Type m_angle;
|
Type m_angle;
|
||||||
constexpr Angle(const Type& degrees)
|
constexpr explicit Angle(const Type& degrees)
|
||||||
{
|
{
|
||||||
if constexpr (flags == AngleFlags::Normalized)
|
if constexpr (flags == AngleFlags::Normalized)
|
||||||
m_angle = angles::WrapAngle(degrees, min, max);
|
m_angle = angles::WrapAngle(degrees, min, max);
|
||||||
|
|||||||
@@ -38,10 +38,7 @@ namespace omath
|
|||||||
|
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
float& operator[](size_t row, size_t column)
|
float& operator[](size_t row, size_t column);
|
||||||
{
|
|
||||||
return At(row, column);
|
|
||||||
}
|
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
size_t ColumnsCount() const noexcept;
|
size_t ColumnsCount() const noexcept;
|
||||||
|
|||||||
@@ -74,6 +74,11 @@ namespace omath
|
|||||||
{
|
{
|
||||||
return m_rows;
|
return m_rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float& Matrix::operator[](const size_t row, const size_t column)
|
||||||
|
{
|
||||||
|
return At(row, column);
|
||||||
|
}
|
||||||
|
|
||||||
Matrix::Matrix(Matrix&& other) noexcept
|
Matrix::Matrix(Matrix&& other) noexcept
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user