Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-06-04 04:14:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-04 04:14:59 +0300
commit0dbd05ffdd52c62c055fa68ab42061831a71b1ee (patch)
treefa014b692469714b17edcee5e771f86ebaf2e1d7 /source/blender/collada
parentea3a652fbf5b5a56c939a36df5314a42565c41b2 (diff)
Cleanup: Cleanup: style, use braces for collada (BCMath)
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/BCMath.cpp6
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;
}
}