diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-05 21:27:52 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-05 21:27:52 +0400 |
commit | 887d517e3b745945d3c8f7e2dc6e1d791067d1e8 (patch) | |
tree | d4c962031f7efb788d7b63705f155f92f4867219 /source/blender/editors/animation/anim_draw.c | |
parent | dfdfa06c27c6dc44cb3f05e0355279d9e16eab93 (diff) |
use define for 0.375 = GLA_PIXEL_OFS, used all over the interface.
also use M_SQRT1_2 in math_rotation.c
Diffstat (limited to 'source/blender/editors/animation/anim_draw.c')
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 0d48bf19c9e..9c9d7f8e34a 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -100,7 +100,7 @@ void ANIM_timecode_string_from_frame(char *str, Scene *scene, int power, short t } else { /* seconds (with pixel offset rounding) */ - seconds = (int)floor(cfra + 0.375f); + seconds = (int)floor(cfra + GLA_PIXEL_OFS); } switch (U.timecode_style) { @@ -150,7 +150,7 @@ void ANIM_timecode_string_from_frame(char *str, Scene *scene, int power, short t /* only show the original seconds display */ /* round to whole numbers if power is >= 1 (i.e. scale is coarse) */ if (power <= 0) sprintf(str, "%.*f", 1 - power, raw_seconds); - else sprintf(str, "%d", (int)floor(raw_seconds + 0.375f)); + else sprintf(str, "%d", (int)floor(raw_seconds + GLA_PIXEL_OFS)); } break; @@ -166,7 +166,7 @@ void ANIM_timecode_string_from_frame(char *str, Scene *scene, int power, short t else { /* round to whole numbers if power is >= 1 (i.e. scale is coarse) */ if (power <= 0) sprintf(str, "%.*f", 1 - power, cfra); - else sprintf(str, "%d", (int)floor(cfra + 0.375f)); + else sprintf(str, "%d", (int)floor(cfra + GLA_PIXEL_OFS)); } } |