summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/utils
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2014-02-17 12:49:48 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2014-02-17 12:49:48 +0000
commitcb14b66aaec03fd9a0fce4e5b3f6d4c9dccb7f3a (patch)
tree46ad6d8fef4a2fdcdc7cfcd7a2a99cd79746db91 /Build/source/texk/web2c/luatexdir/utils
parent79e131889d91cfd991574ed8763e45ac0154bb11 (diff)
Simplify rint() for W32
git-svn-id: svn://tug.org/texlive/trunk@32991 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/utils')
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/utils.w11
1 files changed, 1 insertions, 10 deletions
diff --git a/Build/source/texk/web2c/luatexdir/utils/utils.w b/Build/source/texk/web2c/luatexdir/utils/utils.w
index 6dd0df5296d..cf63c479097 100644
--- a/Build/source/texk/web2c/luatexdir/utils/utils.w
+++ b/Build/source/texk/web2c/luatexdir/utils/utils.w
@@ -451,16 +451,7 @@ int do_zround(double r)
# include <math.h>
double rint(double x)
{
- double c, f, d1, d2;
-
- c = ceil(x);
- f = floor(x);
- d1 = fabs(c - x);
- d2 = fabs(x - f);
- if (d1 > d2)
- return f;
- else
- return c;
+ return floor(x+0.5);
}
#endif