diff options
Diffstat (limited to 'src/engine/data/bounds.cpp')
-rw-r--r-- | src/engine/data/bounds.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/engine/data/bounds.cpp b/src/engine/data/bounds.cpp index cd08a02..fbd7ec4 100644 --- a/src/engine/data/bounds.cpp +++ b/src/engine/data/bounds.cpp @@ -5,34 +5,34 @@ Bounds::Bounds(const BoundsOptions &options) { } -uint32_t Bounds::width() const noexcept +uint32_t Bounds::get_width() const noexcept { return _width; } -void Bounds::width(uint32_t width) noexcept +void Bounds::set_width(uint32_t width) noexcept { _width = width; } -uint32_t Bounds::height() const noexcept +uint32_t Bounds::get_height() const noexcept { return _height; } -void Bounds::height(uint32_t height) noexcept +void Bounds::set_height(uint32_t height) noexcept { _height = height; } CoordsValidation Bounds::validate_coords(const Vector2 &coords) const noexcept { - if (coords.x() >= _width) + if (coords.get_x() >= _width) { return CoordsValidation::X_HIGH; } - if (coords.y() >= _height) + if (coords.get_y() >= _height) { return CoordsValidation::Y_HIGH; } @@ -42,24 +42,24 @@ CoordsValidation Bounds::validate_coords(const Vector2 &coords) const noexcept const Bounds &Bounds::operator*=(const Bounds &bounds) noexcept { - _width *= bounds.width(); - _height *= bounds.height(); + _width *= bounds._width; + _height *= bounds._height; return *this; } const Bounds &Bounds::operator+=(const Bounds &bounds) noexcept { - _width += bounds.width(); - _height += bounds.height(); + _width += bounds._width; + _height += bounds._height; return *this; } const Bounds &Bounds::operator-=(const Bounds &bounds) noexcept { - _width -= bounds.width(); - _height -= bounds.height(); + _width -= bounds._width; + _height -= bounds._height; return *this; } |