added Math.PI*2 precalculation to reduce calculations