using System;
using UnityEngine;

// Token: 0x020000A5 RID: 165
public static class FloatExtensions
{
	// Token: 0x06000F5D RID: 3933 RVA: 0x00129C58 File Offset: 0x00127E58
	public static float ToNearestMultiple(this float f, float multiple, int roundingType)
	{
		f = (float)Mathf.CeilToInt(f * 100f);
		multiple = (float)Mathf.CeilToInt(multiple * 100f);
		f /= multiple;
		f = ((roundingType == 0) ? Mathf.Ceil(f) : ((roundingType == 1) ? Mathf.Floor(f) : Mathf.Round(f))) * multiple;
		return f / 100f;
	}

	// Token: 0x0200021B RID: 539
	public enum ROUNDING
	{
		// Token: 0x0400334F RID: 13135
		UP,
		// Token: 0x04003350 RID: 13136
		DOWN,
		// Token: 0x04003351 RID: 13137
		CLOSEST
	}
}
