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:
authorCampbell Barton <ideasman42@gmail.com>2011-02-05 09:14:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-02-05 09:14:50 +0300
commitdd08305e7506233611315dc6c60013fbac30b53d (patch)
treefb9e9d1e65ec790d20a51056aa3ab98766b2a68f /source/blender/blenlib/intern/math_vector.c
parentf2a6395e21c723843c0e44bba22de0c7aa1a3d08 (diff)
Rename python mathutils functions and split in-place methods from those that return new values.
http://wiki.blender.org/index.php/Dev:2.5/Source/Python/Mathutils This completes the changes proposed. This will break scripts (fixing coming up next), for full list of changes see mathutils.c comments.
Diffstat (limited to 'source/blender/blenlib/intern/math_vector.c')
-rw-r--r--source/blender/blenlib/intern/math_vector.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index 37a68cb0fca..bcad7894e86 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -375,6 +375,21 @@ void range_vni(int *array_tar, const int size, const int start)
while(i--) { *(array_pt--) = j--; }
}
+void negate_vn(float *array_tar, const int size)
+{
+ float *array_pt= array_tar + (size-1);
+ int i= size;
+ while(i--) { *(array_pt--) *= -1.0f; }
+}
+
+void negate_vn_vn(float *array_tar, const float *array_src, const int size)
+{
+ float *tar= array_tar + (size-1);
+ const float *src= array_src + (size-1);
+ int i= size;
+ while(i--) { *(tar--) = - *(src--); }
+}
+
void mul_vn_fl(float *array_tar, const int size, const float f)
{
float *array_pt= array_tar + (size-1);