diff options
Diffstat (limited to 'src/engine/data/bounds.cpp')
-rw-r--r-- | src/engine/data/bounds.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/engine/data/bounds.cpp b/src/engine/data/bounds.cpp index 41b6dc0..fdf8c6b 100644 --- a/src/engine/data/bounds.cpp +++ b/src/engine/data/bounds.cpp @@ -1,48 +1,48 @@ #include "bounds.hpp" -Bounds::Bounds(const BoundsOptions &options) +Bounds::Bounds(const BoundsOptions &options) noexcept : _width(options.width), _height(options.height) { } -uint32_t Bounds::get_width() const noexcept +Bounds::Value Bounds::get_width() const noexcept { return _width; } -void Bounds::set_width(uint32_t width) noexcept +void Bounds::set_width(Bounds::Value width) noexcept { _width = width; } -uint32_t Bounds::get_height() const noexcept +Bounds::Value Bounds::get_height() const noexcept { return _height; } -void Bounds::set_height(uint32_t height) noexcept +void Bounds::set_height(Bounds::Value height) noexcept { _height = height; } CoordsValidation Bounds::validate_coords(const Vector2 &coords) const noexcept { - if (static_cast<uint32_t>(coords.get_x()) >= _width) + if (static_cast<Bounds::Value>(coords.get_x()) >= _width) { return CoordsValidation::X_HIGH; } - if (static_cast<uint32_t>(coords.get_x()) <= 0) + if (static_cast<Bounds::Value>(coords.get_x()) <= 0) { return CoordsValidation::X_LOW; } - if (static_cast<uint32_t>(coords.get_y()) >= _height) + if (static_cast<Bounds::Value>(coords.get_y()) >= _height) { return CoordsValidation::Y_HIGH; } - if (static_cast<uint32_t>(coords.get_y()) <= 0) + if (static_cast<Bounds::Value>(coords.get_y()) <= 0) { return CoordsValidation::Y_LOW; } |