From e77fadf06682fd686eea458c351ac985d6b34ae8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 7 Jan 2010 12:41:07 +0000 Subject: fix for painting bug added since 25391 (own fault) Making shell_angle_to_dist use radians was needed for solidify but somehow broke paint. Need to look into further but for now this fixes it. --- source/blender/blenlib/BLI_math_vector.h | 2 ++ source/blender/blenlib/intern/math_vector_inline.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index 4dbef4ef07c..4719a835788 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -72,11 +72,13 @@ MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3]); MINLINE void mul_v2_fl(float r[2], float f); MINLINE void mul_v3_fl(float r[3], float f); MINLINE void mul_v3_v3fl(float r[3], float a[3], float f); +MINLINE void mul_v2_v2(float r[2], const float a[2]); MINLINE void mul_v3_v3(float r[3], float a[3]); MINLINE void mul_v3_v3v3(float r[3], float a[3], float b[3]); MINLINE void madd_v3_v3fl(float r[3], float a[3], float f); MINLINE void madd_v3_v3v3(float r[3], float a[3], float b[3]); +MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], const float f); MINLINE void madd_v3_v3v3fl(float r[3], float a[3], float b[3], float f); MINLINE void madd_v3_v3v3v3(float r[3], float a[3], float b[3], float c[3]); diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 8b09cb86d3a..86a0d0f49a1 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -145,6 +145,12 @@ MINLINE void mul_v3_v3fl(float r[3], float a[3], float f) r[2]= a[2]*f; } +MINLINE void mul_v2_v2(float r[2], const float a[2]) +{ + r[0] *= a[0]; + r[1] *= a[1]; +} + MINLINE void mul_v3_v3(float r[3], float a[3]) { r[0] *= a[0]; @@ -166,6 +172,12 @@ MINLINE void madd_v3_v3v3(float r[3], float a[3], float b[3]) r[2] += a[2]*b[2]; } +MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], const float f) +{ + r[0] = a[0] + b[0]*f; + r[1] = a[1] + b[1]*f; +} + MINLINE void madd_v3_v3v3fl(float r[3], float a[3], float b[3], float f) { r[0] = a[0] + b[0]*f; -- cgit v1.2.3