input basics

This commit is contained in:
vaxerski 2022-03-17 15:53:45 +01:00
parent 52090853da
commit cf51ab71a2
17 changed files with 459 additions and 19 deletions

View file

@ -16,4 +16,8 @@ double Vector2D::normalize() {
y /= max;
return max;
}
Vector2D Vector2D::floor() {
return Vector2D((int)x, (int)y);
}

View file

@ -26,4 +26,15 @@ class Vector2D {
Vector2D operator/(float a) {
return Vector2D(this->x / a, this->y / a);
}
bool operator==(Vector2D& a) {
return a.x == x && a.y == y;
}
bool operator!=(Vector2D& a) {
return a.x != x || a.y != y;
}
Vector2D floor();
};