Author Topic: Help me with figuring out a formula. D:  (Read 431 times)

So I'm developing my game, and I can't seem to figure out a proper "accuracy" formula.

The ball hitting the paddle would be a hit, and the ball hitting a red bar would be a miss.
Code: [Select]
accuracy = ini_read_real("stats","voidhits",0)/ini_read_real("stats","paddlehits",0)*100is the closest I've come to getting it, but it's reversed.

Help. D:

Divide paddle hits by the total of hits and misses then multiply by 100. From what I see it looks like you are currently dividing missed hits by paddle hits.

Divide paddle hits by total hits and multiply by 100. From what I see it looks like you are currently dividing missed hits by paddle hits.
Looks like it worked, thank you.