diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-22 22:40:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-22 22:40:50 +0400 |
commit | 76bea854b6910ed64c94e6b34c531a150ffcb361 (patch) | |
tree | 3b02bdcc02ea682eb5d3037e371b34f2b0b9dd24 /source/blender/blenkernel/intern | |
parent | ea229638a007bdcf8155fc3f8b8baef96c893f0f (diff) |
code cleanup: replace cos(M_PI / 4) and sin(M_PI / 4) with M_SQRT1_2 define
also some minor style cleanup.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 048560f3a83..fa394d4a951 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1688,16 +1688,16 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4]) if (cu->flag & CU_FOLLOW) { #if 0 - float x1, q[4]; + float si, q[4]; vec_to_quat(quat, dir, ob->trackflag, ob->upflag); /* the tilt */ normalize_v3(dir); q[0] = (float)cos(0.5 * vec[3]); - x1 = (float)sin(0.5 * vec[3]); - q[1] = -x1 * dir[0]; - q[2] = -x1 * dir[1]; - q[3] = -x1 * dir[2]; + si = (float)sin(0.5 * vec[3]); + q[1] = -si * dir[0]; + q[2] = -si * dir[1]; + q[3] = -si * dir[2]; mul_qt_qtqt(quat, q, quat); #else quat_apply_track(quat, ob->trackflag, ob->upflag); |