matrix: add scalar filling constructor

This commit is contained in:
Danny Robson 2018-04-11 18:23:57 +10:00
parent ea75b102d0
commit 2ef759877e

View File

@ -48,6 +48,12 @@ namespace util {
///////////////////////////////////////////////////////////////////////
constexpr matrix () noexcept = default;
constexpr matrix(ValueT fill)
{
for (auto &r: values)
r = fill;
}
//---------------------------------------------------------------------
constexpr matrix (const ValueT(&_data)[Rows][Cols]) noexcept: