diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-07-30 13:00:59 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-07-30 14:19:41 +0400 |
commit | 74758576fc9c1220563c86ce47a17c51d08a6d4f (patch) | |
tree | 2291df8ac132913345f87322a473d19f650ce25c /source/blender/blenlib/intern/math_vector_inline.c | |
parent | eea7521e21f9aed1c996dde5b248c5c8d5926440 (diff) |
Cleanup: general cleanup in BLI_math code (mostly, use 'const' where possible, true/false for booleans, format for float litterals).
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r-- | source/blender/blenlib/intern/math_vector_inline.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 135050f4a3f..0a990e0d63d 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -850,17 +850,17 @@ MINLINE void normal_float_to_short_v3(short out[3], const float in[3]) MINLINE bool is_zero_v2(const float v[2]) { - return (v[0] == 0 && v[1] == 0); + return (v[0] == 0.0f && v[1] == 0.0f); } MINLINE bool is_zero_v3(const float v[3]) { - return (v[0] == 0 && v[1] == 0 && v[2] == 0); + return (v[0] == 0.0f && v[1] == 0.0f && v[2] == 0.0f); } MINLINE bool is_zero_v4(const float v[4]) { - return (v[0] == 0 && v[1] == 0 && v[2] == 0 && v[3] == 0); + return (v[0] == 0.0f && v[1] == 0.0f && v[2] == 0.0f && v[3] == 0.0f); } MINLINE bool is_finite_v2(const float v[2]) @@ -880,7 +880,7 @@ MINLINE bool is_finite_v4(const float v[4]) MINLINE bool is_one_v3(const float v[3]) { - return (v[0] == 1 && v[1] == 1 && v[2] == 1); + return (v[0] == 1.0f && v[1] == 1.0f && v[2] == 1.0f); } |