diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-09-29 18:54:13 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-10-01 16:14:46 +0300 |
commit | a5101de6a95647d19821bde9f8d68776ce8881fa (patch) | |
tree | 54d2687d2de935a767115447dc766c248a458630 /source/blender/blenlib/intern | |
parent | e38a0b3748683a35601c256053f716ad8b57002f (diff) |
BLI: Add mul_v2_v2v2 function
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/math_vector_inline.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 297fa9479da..fcab001631e 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -615,6 +615,12 @@ MINLINE void mul_v3_v3v3(float r[3], const float v1[3], const float v2[3]) r[2] = v1[2] * v2[2]; } +MINLINE void mul_v2_v2v2(float r[2], const float a[2], const float b[2]) +{ + r[0] = a[0] * b[0]; + r[1] = a[1] * b[1]; +} + MINLINE void negate_v2(float r[2]) { r[0] = -r[0]; |