mirror of
https://github.com/hyprwm/hyprutils.git
synced 2024-11-16 23:05:58 +01:00
Math: add an int ctor to vec
This commit is contained in:
parent
e9d4a99e13
commit
b4b5389bc1
2 changed files with 6 additions and 0 deletions
|
@ -8,6 +8,7 @@ namespace Hyprutils {
|
|||
class Vector2D {
|
||||
public:
|
||||
Vector2D(double, double);
|
||||
Vector2D(int, int);
|
||||
Vector2D();
|
||||
~Vector2D();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue