public float GetImageRotation() { float rot = (float) ((rotationRadians - initialRotation) % (2.0 * Math.PI)); if (rot < 0) { rot += (float)(2.0 * Math.PI); } return rot; }