if ( $fromR > $toR) { $rstep = ($fromR - $toR) / length($string); } elsif ( $fromR < $toR) { $rstep = ($toR - $fromR) / length($string); }