Hacker News new | ask | show | jobs
by Stay_frostJebel 2572 days ago
Why is pmouseX subtracted from mouseX? And why is pmouseY subtracted from mouseY?
1 comments

They're using the difference in mouseX (or mouseY) to dictate the amount to rotate the object. To do that, you subtract it from the previous one (mouseX-pmouseX).