遠くは遅くて、近くを早くする場合は、現在の目標までの距離を最大距離から引くと、
近づくほど速さを速く算出できます。
You can calculate the speed so that it increases as the distance gets shorter and decrease as the distance gets longer.
To achieve this, subtract the current distance to the target from the maximum distance. This way, the closer the target gets, the faster the calculated speed becomes.