Yes, /agree with above, just look at the distance the ball is from the hole. It's that simple.
How you can get the ball to "ride the rim" of the hole will be more complicated. Are you writing a golf game?
How you can get the ball to "ride the rim" of the hole will be more complicated. Are you writing a golf game?