bool operator==(const SquareMatrix &a, const SquareMatrix &b)
{
    if (a.dimensions() != b.dimensions())
    {
        return false;
    }

    size_t elementCount = a.elementCount();
    for (size_t i = 0; i < elementCount; ++i)
    {
        if (a.at(i) != b.at(i))
        {
            return false;
        }
    }
    return true;
}
SquareMatrix::SquareMatrix(const SquareMatrix &other)
    : SquareMatrix(other.dimensions(), false)
{
    std::copy(other.mData, other.mData + other.elementCount(), mData);
}