projects
/
blender.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7ef312
)
Collada: Use floating point version of abs()
author
Sergey Sharybin <sergey.vfx@gmail.com>
Tue, 27 Feb 2018 10:14:17 +0000
(11:14 +0100)
committer
Sergey Sharybin <sergey.vfx@gmail.com>
Tue, 27 Feb 2018 10:14:17 +0000
(11:14 +0100)
Avoids implicit cast of float to int.
source/blender/collada/collada_utils.h
patch
|
blob
|
history
diff --git
a/source/blender/collada/collada_utils.h
b/source/blender/collada/collada_utils.h
index bbe36f2999c66f60b48f99aeaf8f6b44a3a1c993..0069b4d48711f4d6670c33325d19c0fa7b0d88ee 100644
(file)
--- a/
source/blender/collada/collada_utils.h
+++ b/
source/blender/collada/collada_utils.h
@@
-105,7
+105,7
@@
extern int bc_set_layer(int bitfield, int layer, bool enable);
extern int bc_set_layer(int bitfield, int layer);
inline bool bc_in_range(float a, float b, float range) {
- return
abs
(a - b) < range;
+ return
fabsf
(a - b) < range;
}
void bc_copy_m4_farray(float r[4][4], float *a);
void bc_copy_farray_m4(float *r, float a[4][4]);