From 578cf43e9c8384aab463aa2a33c5be00e46dc999 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 1 Jul 2022 17:27:49 +0200 Subject: refactor: matrix add get_size method --- src/engine/graphics/matrix_impl.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/engine/graphics/matrix_impl.hpp') diff --git a/src/engine/graphics/matrix_impl.hpp b/src/engine/graphics/matrix_impl.hpp index 9105149..d2de795 100644 --- a/src/engine/graphics/matrix_impl.hpp +++ b/src/engine/graphics/matrix_impl.hpp @@ -81,6 +81,12 @@ auto Matrix::get_column_cnt() const noexcept -> std::uint32_t return _column_cnt; } +template +auto Matrix::get_size() const noexcept -> Bounds +{ + return Bounds({.width = _column_cnt, .height = _row_cnt}); +} + template auto Matrix::begin() const noexcept -> MatrixIterator { -- cgit v1.2.3-18-g5258