diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-01 19:25:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-01 19:25:52 +0000 |
commit | 7f0ffae23166177e2bf9143942da3b5d722ab016 (patch) | |
tree | e58565ff4c3122d57c3feda421dd653b3cd486f6 /term_ascii.c | |
parent | f0a1f96fe7ebbe75d5432cd491f6ea60095c5304 (diff) | |
download | mandoc-7f0ffae23166177e2bf9143942da3b5d722ab016.tar.gz mandoc-7f0ffae23166177e2bf9143942da3b5d722ab016.tar.zst mandoc-7f0ffae23166177e2bf9143942da3b5d722ab016.zip |
Clarity with respect to floating point handling:
Write double constants as double rather than integer literals.
Remove useless explicit (double) cast done at one place and nowhere else.
No functional change.
Diffstat (limited to 'term_ascii.c')
-rw-r--r-- | term_ascii.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/term_ascii.c b/term_ascii.c index adcbe590..b1e328c0 100644 --- a/term_ascii.c +++ b/term_ascii.c @@ -1,4 +1,4 @@ -/* $Id: term_ascii.c,v 1.26 2014/07/27 21:52:16 schwarze Exp $ */ +/* $Id: term_ascii.c,v 1.27 2014/08/01 19:25:52 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -238,22 +238,22 @@ ascii_hspan(const struct termp *p, const struct roffsu *su) switch (su->unit) { case SCALE_CM: - r = 4 * su->scale; + r = su->scale * 4.0; break; case SCALE_IN: - r = 10 * su->scale; + r = su->scale * 10.0; break; case SCALE_PC: - r = (10 * su->scale) / 6; + r = (su->scale * 10.0) / 6.0; break; case SCALE_PT: - r = (10 * su->scale) / 72; + r = (su->scale * 10.0) / 72.0; break; case SCALE_MM: - r = su->scale / 1000; + r = su->scale / 1000.0; break; case SCALE_VS: - r = su->scale * 2 - 1; + r = su->scale * 2.0 - 1.0; break; default: r = su->scale; |