Fixed map-to-mouse position code

The map-to-mouse inverse position algorithm has been redone to work
perfectly. I also included a new tip for the coding style guide. It's to
avoid having to remember the previous value of the variable for the
unary operation and to just make the change.