Answers for "scale between tow ranges c#"

C#
0

scale between tow ranges c#

public float scale(float OldMin, float OldMax, float NewMin, float NewMax, float OldValue){
 
    float OldRange = (OldMax - OldMin);
    float NewRange = (NewMax - NewMin);
    float NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin;
 
    return(NewValue);
}
Posted by: Guest on September-16-2020

Code answers related to "scale between tow ranges c#"

C# Answers by Framework

Browse Popular Code Answers by Language