Date: | August 11, 2003 / year-entry #18 |
Tags: | code |
Orig Link: | https://blogs.msdn.microsoft.com/oldnewthing/20030811-00/?p=90461 |
Comments: | 0 |
Summary: | What is the significance of the (int) cast in the computation of dLines? It isn't. I got the question wrong. The real question should have been "What is the significance of the (int) cast in the computation of g_iWheelCarryover?" The answer is to ensure that the computation is performed with signed integers throughout. If the... |
What is the significance of the It isn't. I got the question wrong. The real question should have been "What is the significance of the The answer is to ensure that the computation is performed with signed integers throughout. If the cast were missing, then the computation would have been unsigned (since mixing signed and unsigned yields unsigned). Assuming you don't have a high-resolution wheel mouse, how would you test that your sub-detent mouse wheel handling was working properly? This is an easy one. Insert temporary code at the top of the |