public static float MapClampRanged(float OldValue, float OldMin, float OldMax, float NewMin, float NewMax)
{
float OldRange = (OldMax - OldMin);
float NewRange = (NewMax - NewMin);
float NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin;
return (NewValue);
}