//
// Created by sebastian on 10.02.26.
//

#ifndef DICEWARS_SIEDLER_DIMENSIONS_H
#define DICEWARS_SIEDLER_DIMENSIONS_H
#include <cstdio>
struct Dimensions {
    float x, y;
    float width, height;

    void set(const float x, const float y, const float width, const float height) {
        this->x = x;
        this->y = y;
        this->width = width;
        this->height = height;
    }

    [[nodiscard]] bool contains(const float testX, const float testY) const {
        //printf("Mouse(%f, %f); Button(x=%f, y=%f, width=%f, height=%f\n", testX, testY, x, y, width, height);
        return testX >= x && testX <= x + width && testY >= y && testY <= y + height;
    }
};

#endif //DICEWARS_SIEDLER_DIMENSIONS_H