hi i have a number that interpolates from 0 to 0.72
I would like to have interpolation funcion where 0.72 would return for some other varible =100,
when 0.71 return around 98 and that number would go to zero when that 0.72 would be going to zero
0<------->0.72
0<----------->100
is there any allready build in function? thx in advance
function Interpolate(multiculti:double,x:float)
{
x=100*(mojeG)/73;
multiculti=100-(x*100)+0.6;
multiculti.ToString("F2");
return multiculti;
}
in update
CountryMultiCultiLevel=Interpolate(0,0);
multiculty=CountryMultiCultiLevel.ToString(“F2”);
this will take interpolated value from 0 to 0.72 as mojeG, then its converted to 0 to 72 then it will Applay that change in interpolation in range 0,100, then its inverted for my own purpose the higher number in range 0,100 the lowest
CountryMultiCultiLevel. tested and it works
BTW 1 is larger than 72 by more then 30% of 72
0.3 is 30% from 1, 30% of 72=21—>72+21=93
I dynamicly change one of values of Color(X,MyColor,X,X); variable MyColor is being interpolated from 0 to 0.72 dynamicly
I wanted to to use interpolation of value MyColor to interpolate the variable double “Multi_culti_level”
in range from 0 to 100 that would correspond to the change in MyColor variable
After it was achieved I inverted interpolation, so the bigger value of MyColor(0 to 0.72) the lower Multi_culti_level value from 0,100 is:) maybe what was written before was a bit unclear XD