Math: add an int ctor to vec

This commit is contained in:
Vaxry 2024-06-18 18:17:55 +02:00
parent e9d4a99e13
commit b4b5389bc1
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@ namespace Hyprutils {
class Vector2D {
public:
Vector2D(double, double);
Vector2D(int, int);
Vector2D();
~Vector2D();

View File

@ -9,6 +9,11 @@ Hyprutils::Math::Vector2D::Vector2D(double xx, double yy) {
y = yy;
}
Hyprutils::Math::Vector2D::Vector2D(int xx, int yy) {
x = (double)xx;
y = (double)yy;
}
Hyprutils::Math::Vector2D::Vector2D() {
x = 0;
y = 0;