diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-06-04 04:14:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-06-04 04:14:59 +0300 |
commit | 0dbd05ffdd52c62c055fa68ab42061831a71b1ee (patch) | |
tree | fa014b692469714b17edcee5e771f86ebaf2e1d7 /source/blender/collada | |
parent | ea3a652fbf5b5a56c939a36df5314a42565c41b2 (diff) |
Cleanup: Cleanup: style, use braces for collada (BCMath)
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/BCMath.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/collada/BCMath.cpp b/source/blender/collada/BCMath.cpp index c82ecbb7441..ec9977c1469 100644 --- a/source/blender/collada/BCMath.cpp +++ b/source/blender/collada/BCMath.cpp @@ -183,8 +183,9 @@ void BCMatrix::get_matrix(DMatrix &mat, const bool transposed, const int precisi 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; } } @@ -198,8 +199,9 @@ void BCMatrix::get_matrix(Matrix &mat, 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; } } |