mirror of https://github.com/AxioDL/zeus.git
CVector2i: Make conversions to float explicit
This commit is contained in:
parent
056515b2d3
commit
c39186d3ba
|
@ -16,7 +16,7 @@ public:
|
||||||
|
|
||||||
constexpr CVector2i(const CVector2f& vec) noexcept : x(int32_t(vec.x())), y(int32_t(vec.y())) {}
|
constexpr CVector2i(const CVector2f& vec) noexcept : x(int32_t(vec.x())), y(int32_t(vec.y())) {}
|
||||||
|
|
||||||
constexpr CVector2f toVec2f() const noexcept { return CVector2f(x, y); }
|
constexpr CVector2f toVec2f() const noexcept { return CVector2f(float(x), float(y)); }
|
||||||
|
|
||||||
constexpr CVector2i operator+(const CVector2i& val) const noexcept { return CVector2i(x + val.x, y + val.y); }
|
constexpr CVector2i operator+(const CVector2i& val) const noexcept { return CVector2i(x + val.x, y + val.y); }
|
||||||
constexpr CVector2i operator-(const CVector2i& val) const noexcept { return CVector2i(x - val.x, y - val.y); }
|
constexpr CVector2i operator-(const CVector2i& val) const noexcept { return CVector2i(x - val.x, y - val.y); }
|
||||||
|
|
Loading…
Reference in New Issue