Skip to content

Commit

Permalink
Math: add an int ctor to vec
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jun 18, 2024
1 parent e9d4a99 commit b4b5389
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/hyprutils/math/Vector2D.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Hyprutils {
class Vector2D {
public:
Vector2D(double, double);
Vector2D(int, int);
Vector2D();
~Vector2D();

Expand Down
5 changes: 5 additions & 0 deletions src/math/Vector2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b4b5389

Please sign in to comment.