using UnityEngine;

public abstract class Util  {
	private static int id = 0;
	private static int fixedID = 0;

	public static int freshId() {
		return id++;
	}

	public static int classFreshId() {
		return fixedID++;
	}

	public static Color getColorFromValue(float value) {
		if (value < 0.3f) {
			return new Color(0.82f, 0.37f, 0.37f);
		}
		else if (value < 0.7f) {
			return new Color(0.88f, 0.74f, 0.20f);
		}
		else {
			return new Color(0.333f, 0.67f, 0.41f);
		}
	}

	public static float mod(float a, float b) {
		return (a % b + b) % b;
	}
}
