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-08-30 14:49:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-30 14:49:58 +0400
commitb20c9b0ba368d5685d3c996572780befe852b889 (patch)
tree3431d53b89ef0332fcdb1a76293278041740c22e /source/blender
parent6c9ee34dd8acba35808847d3669798c6d3459b9c (diff)
minor edits, pep8 - also correct float -> double promotion for blf.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenfont/intern/blf.c30
-rw-r--r--source/blender/editors/space_nla/nla_edit.c2
2 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index c0e62b1c0c7..fc812d652b3 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -369,28 +369,28 @@ void BLF_position(int fontid, float x, float y, float z)
za= 1.0f;
}
- remainder= x - floor(x);
- if (remainder > 0.4 && remainder < 0.6) {
- if (remainder < 0.5)
- x -= 0.1 * xa;
+ remainder= x - floorf(x);
+ if (remainder > 0.4f && remainder < 0.6f) {
+ if (remainder < 0.5f)
+ x -= 0.1f * xa;
else
- x += 0.1 * xa;
+ x += 0.1f * xa;
}
- remainder= y - floor(y);
- if (remainder > 0.4 && remainder < 0.6) {
- if (remainder < 0.5)
- y -= 0.1 * ya;
+ remainder= y - floorf(y);
+ if (remainder > 0.4f && remainder < 0.6f) {
+ if (remainder < 0.5f)
+ y -= 0.1f * ya;
else
- y += 0.1 * ya;
+ y += 0.1f * ya;
}
- remainder= z - floor(z);
- if (remainder > 0.4 && remainder < 0.6) {
- if (remainder < 0.5)
- z -= 0.1 * za;
+ remainder= z - floorf(z);
+ if (remainder > 0.4f && remainder < 0.6f) {
+ if (remainder < 0.5f)
+ z -= 0.1f * za;
else
- z += 0.1 * za;
+ z += 0.1f * za;
}
font->pos[0]= x;
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 1894a9fd651..08026e8a1d2 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -1858,7 +1858,7 @@ static int nlaedit_snap_exec (bContext *C, wmOperator *op)
strip->start= (float)CFRA;
break;
case NLAEDIT_SNAP_NEAREST_FRAME: /* to nearest frame */
- strip->start= floorf(start+0.5);
+ strip->start= floorf(start+0.5f);
break;
case NLAEDIT_SNAP_NEAREST_SECOND: /* to nearest second */
strip->start= floorf(start/secf + 0.5f) * secf;