Removing side effects from calculation function
Removing side effects from calculation function

The function now calculates the target rotation without any side effects.
Hopefully this should make this function more generic.

jstrait/webgl-city,jstrait/webgl-city