diff options
author | Andrew Pinkham <code@andrewsforge.com> | 2014-04-27 14:38:22 -0500 |
---|---|---|
committer | Andrew Pinkham <code@andrewsforge.com> | 2014-04-27 14:38:22 -0500 |
commit | 49cd1b262c6e38ee3d97e68a6f13108a175bd97e (patch) | |
tree | fe48b8af07b70f47ac0aba16e06acf327584f731 | |
parent | c2bb2b58256a83f9204c2e8b80660ba7f836dbf2 (diff) | |
download | pygments-49cd1b262c6e38ee3d97e68a6f13108a175bd97e.tar.gz |
RTF Formatter: removed unnecessary floor function.
-rw-r--r-- | pygments/formatters/rtf.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/formatters/rtf.py b/pygments/formatters/rtf.py index 62a10ade..9cd793c9 100644 --- a/pygments/formatters/rtf.py +++ b/pygments/formatters/rtf.py @@ -9,7 +9,6 @@ :license: BSD, see LICENSE for details. """ -from math import floor from pygments.formatter import Formatter from pygments.util import get_int_opt @@ -82,8 +81,9 @@ class RtfFormatter(Formatter): From example D28 of: http://www.unicode.org/book/ch03.pdf """ + cn = int(cn) if (2**16) <= cn: - h = floor((cn - 0x10000) / 0x400) + 0xD800 + h = ((cn - 0x10000) / 0x400) + 0xD800 l = ((cn - 0x10000) % 0x400) + 0xDC00 return h,l else: |