Minor naming fix for keyTyped
Bugfix for calculating frameticks

Frameticks and currenttime should not be reset, if they are reset it
leads to frames with 0 frameticks.
Ping-Pong support, comments, namechanges

Support for ping-pong
Updated comments, changes of named constants.
Check for infinite value

Make sure length is not infinte.
Check for 0 length sides for angle

Check for 0 length sides when calculating angle.
Note that the method will return values in different range when sides
are 0.
Need to look into what range the function should return values in. (0 to
2 * PI or -PI to PI)
Add event value for back key.