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:
authorTiago Chaves <laurelkeys>2020-03-04 02:24:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-04 02:25:44 +0300
commit14c9f64def7439aa4b6b74d57ba9bc2b82177dd6 (patch)
treeb96f188350ad886c61cd3ea6bfa4a0ba5161c387 /source/blender/blenlib/BLI_math_vector.h
parent31aefdeec5a6e098acabee80517aa6ca03933808 (diff)
BLI_math: add clamp_v# and clamp_v#_v#v# utility functions
Diffstat (limited to 'source/blender/blenlib/BLI_math_vector.h')
-rw-r--r--source/blender/blenlib/BLI_math_vector.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index 19a378269fe..e210bae11d6 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -440,6 +440,13 @@ void dist_ensure_v2_v2fl(float v1[2], const float v2[2], const float dist);
void axis_sort_v3(const float axis_values[3], int r_axis_order[3]);
+void clamp_v2(float vec[2], const float min, const float max);
+void clamp_v3(float vec[3], const float min, const float max);
+void clamp_v4(float vec[4], const float min, const float max);
+void clamp_v2_v2v2(float vec[2], const float min[2], const float max[2]);
+void clamp_v3_v3v3(float vec[3], const float min[3], const float max[3]);
+void clamp_v4_v4v4(float vec[4], const float min[4], const float max[4]);
+
/***************************** Array Functions *******************************/
/* follow fixed length vector function conventions. */
double dot_vn_vn(const float *array_src_a,