public void SetArcDegrees(float degs) { degs = Rotations.ClipDegrees(degs); arc = degs / 360f; if (img != null) { img.fillAmount = arc; } }
void UpdateSelection(float lockRot) { float twixtThreeSixty = Rotations.ClipDegrees(lockRot); int intDegrees = Convert.ToInt32(twixtThreeSixty); //don't really trust Mathf.Round to cast to an int properly intDegrees /= 60; if (intDegrees == 6) { intDegrees--; } //is now 0 through 5 selectedIndex = intDegrees; //don't think i need to offset it? }