internal static float RoundToMultipleOf(float value, float roundingValue) { if (roundingValue == 0f) { return value; } return (Mathf.Round(value / roundingValue) * roundingValue); }