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:
authorClément Foucault <foucault.clem@gmail.com>2018-11-17 16:45:59 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-17 16:56:17 +0300
commit0c987aa7ac3a62aafbaaeb55c6e096b043d0b8cd (patch)
tree557528781a159b02f2865fa9d6e1076c0b0312bc /source/blender/blenlib/intern/math_vector_inline.c
parentb4640ea02081f20f599d881d119564d5f6d53f83 (diff)
BLI: Math: Add normal_float_to_short_v4
Diffstat (limited to 'source/blender/blenlib/intern/math_vector_inline.c')
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index dbb2339461f..fc3f11fd1be 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -1025,6 +1025,15 @@ MINLINE void normal_float_to_short_v3(short out[3], const float in[3])
out[2] = (short) (in[2] * 32767.0f);
}
+MINLINE void normal_float_to_short_v4(short out[4], const float in[4])
+{
+ out[0] = (short) (in[0] * 32767.0f);
+ out[1] = (short) (in[1] * 32767.0f);
+ out[2] = (short) (in[2] * 32767.0f);
+ out[3] = (short) (in[3] * 32767.0f);
+}
+
+
/********************************* Comparison ********************************/