diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-05 20:46:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-05 20:57:17 +0400 |
commit | 07ceb99213166b678f0a0bac9c35e9897f22e827 (patch) | |
tree | 70fc2e2639fe00ccb9f6ce94815245067b34454d /source/blender/blenlib/intern/math_vector_inline.c | |
parent | fac8e84632f3ce1b2a8d63fa083ca0aaa61c3267 (diff) |
Code Cleanup: use strict flags for math lib, add inline declarations
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 05be8bda709..45a0cb3f8e2 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -580,9 +580,9 @@ MINLINE void negate_v4_v4(float r[4], const float a[4]) /* could add more... */ MINLINE void negate_v3_short(short r[3]) { - r[0] = -r[0]; - r[1] = -r[1]; - r[2] = -r[2]; + r[0] = (short)-r[0]; + r[1] = (short)-r[1]; + r[2] = (short)-r[2]; } MINLINE float dot_v2v2(const float a[2], const float b[2]) @@ -654,7 +654,7 @@ MINLINE float len_manhattan_v2(const float v[2]) MINLINE int len_manhattan_v2_int(const int v[2]) { - return ABS(v[0]) + ABS(v[1]); + return abs(v[0]) + abs(v[1]); } MINLINE float len_manhattan_v3(const float v[3]) |