diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2014-02-17 12:49:48 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2014-02-17 12:49:48 +0000 |
commit | cb14b66aaec03fd9a0fce4e5b3f6d4c9dccb7f3a (patch) | |
tree | 46ad6d8fef4a2fdcdc7cfcd7a2a99cd79746db91 | |
parent | 79e131889d91cfd991574ed8763e45ac0154bb11 (diff) |
Simplify rint() for W32
git-svn-id: svn://tug.org/texlive/trunk@32991 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ChangeLog | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/utils/utils.w | 11 |
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 |