summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog3
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/utils.w11
2 files changed, 3 insertions, 11 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 8cf5b0fc70f..e5ebdcb3f33 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,6 +1,7 @@
2014-02-17 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
- * utils/utils.w: Typo in a comment.
+ * utils/utils.w: Typo in a comment. Simplify rint() for W32.
+ Thanks Peter.
2014-02-12 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
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