HPL1: make Vector2 constructors constexpr

This commit is contained in:
grisenti 2022-12-12 22:07:13 +01:00 committed by Eugene Sandulenko
parent 13b899b8e4
commit 72c336296f
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -48,22 +48,16 @@ public:
//////////////////////////////////////////
// Constructors
/////////////////////////////////////////
cVector2() {
x = 0;
y = 0;
}
cVector2(T aVal) {
x = aVal;
y = aVal;
}
cVector2(T aX, T aY) {
x = aX;
y = aY;
constexpr cVector2() : x(0), y(0) {
}
cVector2(cVector2<T> const &aVec) {
x = aVec.x;
y = aVec.y;
constexpr cVector2(T aVal) : x(aVal), y(aVal) {
}
constexpr cVector2(T aX, T aY) : x(aX), y(aY) {
}
constexpr cVector2(cVector2<T> const &aVec) : x(aVec.x), y(aVec.y) {
}
//////////////////////////////////////////