But again, this is just an example. The exact parameters would depend on the actual game mechanics.
For example, if the required distance is D, and the player's power is P, then the closer P is to D, the higher the chance. Maybe with a wind component that adds or subtracts from the effective distance. holeinonepangyacalculator 2021
In any case, the calculator should take those inputs and calculate the probability. But again, this is just an example