Cleanup: style, use braces in source/
Automated using clang-tidy.
This commit is contained in:
@@ -203,13 +203,15 @@ void BCMatrix::unit()
|
||||
* precision = -1 indicates to not limit the precision. */
|
||||
void BCMatrix::get_matrix(DMatrix &mat, const bool transposed, const int precision) const
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int j = 0; j < 4; j++) {
|
||||
float val = (transposed) ? matrix[j][i] : matrix[i][j];
|
||||
if (precision >= 0)
|
||||
if (precision >= 0) {
|
||||
val = floor((val * pow(10, precision) + 0.5)) / pow(10, precision);
|
||||
}
|
||||
mat[i][j] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BCMatrix::get_matrix(Matrix &mat,
|
||||
@@ -217,13 +219,15 @@ void BCMatrix::get_matrix(Matrix &mat,
|
||||
const int precision,
|
||||
const bool inverted) const
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int j = 0; j < 4; j++) {
|
||||
float val = (transposed) ? matrix[j][i] : matrix[i][j];
|
||||
if (precision >= 0)
|
||||
if (precision >= 0) {
|
||||
val = floor((val * pow(10, precision) + 0.5)) / pow(10, precision);
|
||||
}
|
||||
mat[i][j] = val;
|
||||
}
|
||||
}
|
||||
|
||||
if (inverted) {
|
||||
invert_m4(mat);
|
||||
|
||||
Reference in New Issue
Block a user