diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-04 08:22:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-04 08:22:38 +0400 |
commit | 2804caff4ce6c9f6d5ebdd101e77c92b7ac65db4 (patch) | |
tree | b3f91af65a3d29c253cae82117bfb4477b834f69 /source/blender/blenkernel/intern | |
parent | 966e86cd2dbe2c627e65766d0361cc79f63d7cc7 (diff) |
code cleanup: use bools, (float)sin/(float)cos -> sinf/cosf, more meaningful var names.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mball.c | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 4 |
3 files changed, 10 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 4d9f0fc769c..12fa16e3273 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -1204,8 +1204,8 @@ static void followpath_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra vec_to_quat(quat, dir, (short)data->trackflag, (short)data->upflag); normalize_v3(dir); - q[0] = (float)cos(0.5 * vec[3]); - x1 = (float)sin(0.5 * vec[3]); + q[0] = cosf(0.5 * vec[3]); + x1 = sinf(0.5 * vec[3]); q[1] = -x1 * dir[0]; q[2] = -x1 * dir[1]; q[3] = -x1 * dir[2]; diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index 72284130869..b93d924ddf9 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -1426,7 +1426,8 @@ static void converge(const float p1[3], const float p2[3], float v1, float v2, while (1) { if (i++ == RES) return; p[0] = 0.5f * (pos[0] + neg[0]); - if ((function(p[0], p[1], p[2])) > 0.0f) pos[0] = p[0]; else neg[0] = p[0]; + if ((function(p[0], p[1], p[2])) > 0.0f) pos[0] = p[0]; + else neg[0] = p[0]; } } @@ -1436,7 +1437,8 @@ static void converge(const float p1[3], const float p2[3], float v1, float v2, while (1) { if (i++ == RES) return; p[1] = 0.5f * (pos[1] + neg[1]); - if ((function(p[0], p[1], p[2])) > 0.0f) pos[1] = p[1]; else neg[1] = p[1]; + if ((function(p[0], p[1], p[2])) > 0.0f) pos[1] = p[1]; + else neg[1] = p[1]; } } @@ -1446,7 +1448,8 @@ static void converge(const float p1[3], const float p2[3], float v1, float v2, while (1) { if (i++ == RES) return; p[2] = 0.5f * (pos[2] + neg[2]); - if ((function(p[0], p[1], p[2])) > 0.0f) pos[2] = p[2]; else neg[2] = p[2]; + if ((function(p[0], p[1], p[2])) > 0.0f) pos[2] = p[2]; + else neg[2] = p[2]; } } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index c2e3d7496e9..5e0ed369733 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1837,8 +1837,8 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[4][4]) /* the tilt */ normalize_v3(dir); - q[0] = (float)cos(0.5 * vec[3]); - si = (float)sin(0.5 * vec[3]); + q[0] = cosf(0.5 * vec[3]); + si = sinf(0.5 * vec[3]); q[1] = -si * dir[0]; q[2] = -si * dir[1]; q[3] = -si * dir[2]; |