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 | a4156c97a7eaea0360abdbc488f740cc4ad6f79f (patch) | |
tree | 6f31d124b977aa61430563f46633f2edac37a6be /term.c | |
parent | 604bf7765cfa3f1a7d5702f8b54d326e7aaab3a4 (diff) | |
download | mandoc-a4156c97a7eaea0360abdbc488f740cc4ad6f79f.tar.gz |
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.c')
-rw-r--r-- | term.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -769,25 +769,25 @@ term_vspan(const struct termp *p, const struct roffsu *su) switch (su->unit) { case SCALE_CM: - r = su->scale * 2; + r = su->scale * 2.0; break; case SCALE_IN: - r = su->scale * 6; + r = su->scale * 6.0; break; case SCALE_PC: r = su->scale; break; case SCALE_PT: - r = su->scale / 8; + r = su->scale / 8.0; break; case SCALE_MM: - r = su->scale / 1000; + r = su->scale / 1000.0; break; case SCALE_VS: r = su->scale; break; default: - r = su->scale - 1; + r = su->scale - 1.0; break; } @@ -801,7 +801,7 @@ term_hspan(const struct termp *p, const struct roffsu *su) { double v; - v = ((*p->hspan)(p, su)); + v = (*p->hspan)(p, su); if (v < 0.0) v = 0.0; return((size_t)v); |