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>2013-03-09 15:40:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-09 15:40:42 +0400
commitabd1748e486e0948df26fb7a0cf42bce67f861ec (patch)
tree8d5510d29295a07e710971ec088dce424de6ea6e /source/blender/blenlib/intern/math_matrix.c
parente2ddd832dcdd890bc7d5ca29b1d8c3ec5848c620 (diff)
code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() -> ED_view3d_calc_zfac() and have it return the zfac to use.
Diffstat (limited to 'source/blender/blenlib/intern/math_matrix.c')
-rw-r--r--source/blender/blenlib/intern/math_matrix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 9d9e3e611e1..e8d0a434e7f 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -367,7 +367,9 @@ void mul_mat3_m4_v3(float mat[4][4], float vec[3])
void mul_project_m4_v3(float mat[4][4], float vec[3])
{
- const float w = vec[0] * mat[0][3] + vec[1] * mat[1][3] + vec[2] * mat[2][3] + mat[3][3];
+ const float w = (mat[0][3] * vec[0]) +
+ (mat[1][3] * vec[1]) +
+ (mat[2][3] * vec[2]) + mat[3][3];
mul_m4_v3(mat, vec);
vec[0] /= w;