roguish/matrix.hpp
2024-12-02 08:11:47 -05:00

14 lines
293 B
C++

#pragma once
#include <vector>
typedef std::vector<int> MatrixRow;
typedef std::vector<MatrixRow> Matrix;
/*
* Just a quick thing to reset a matrix to a value.
*/
inline void matrix_assign(Matrix &out, int new_value) {
for(auto &row : out) {
row.assign(row.size(), new_value);
}
}