internal static float Normalize(float value) { if (value < 0) return 0; if (value > 1) return 1; return (float)value; }