nvda
a8074d50 - Python 3: use floor division (//) to obtain integer results from division operations (#9692)

Commit
6 years ago
Python 3: use floor division (//) to obtain integer results from division operations (#9692) * GUI/Python 3: use floor division (//) when obtaining pixel coordinates in integers. Re #9641. Python 3 changes one slash to tru division rather than classic division. Because of this, when trying to obtain pixel coordinates, float is returned. Thus use floor division (//) to guarantee integers. * NVWare/Python 3: use floor division for int values. Re #9641. ctypes.wintypes.WORD is mapped to ctypes.USHORT, which is in fact an integer. Thus use two slashes instead of one in order to guarantee this. * OneCore speech synthesizer/Python 3: ensure integers via floor division. Re #9641. A comment says no floating points. One way to ensure this is use of two slashes in Python 3.
Author
Committer
Parents
Loading