これは、2点間の距離を0から1の範囲にマッピングする関数が欲しいということだと思う。
```csharp
float MapDistanceToRange(float x, float y) {
    float mappedDistance = (x - y) / (Mathf.Max(x,y));
    return Mathf.Clamp(mappedDistance, 0, 1);
}
```
I am assuming this means that you want a function to map the distance between two points to the range of 0 to 1.
```csharp
float MapDistanceToRange(float x, float y) {
    float mappedDistance = (x - y) / (Mathf.Max(x,y));
    return Mathf.Clamp(mappedDistance, 0, 1);
}
```