laziness, impatience, and hubris | |
PerlMonks |
Re: Normalizing a range of numbers to a percentageby tybalt89 (Monsignor) |
on Mar 07, 2019 at 23:15 UTC ( [id://1231035]=note: print w/replies, xml ) | Need Help?? |
In your case $new_min was zero, so your numbers are good.
is the ratio on the old scale, then multiply by the new scale and add the new offset.
In Section
Seekers of Perl Wisdom
|
|