http://www.perlmonks.org?node_id=899475


in reply to [OT] Normalizing the return result of an exponential formula

I suppose I could do something like:
my $max = 10_000; $distance -= $radius; $distance = 0 if $distance < 0; $distance *= $max/($max-$radius)
then apply the formula to the new "stretched" distance.

Any more elegant way of handling it? (especially one that incorporates dropoff?)