How would I calculate attacks per second?

So it’s a question that probably has a simple answer that I can’t think of.

Let’s say I attack every 1 second the result would be 1 attack/s.
Now if I attack every 0.5 seconds the result I want to have is 2 attacks/s.
And if I attack every 0.1 seconds it should be 10 attacks/s.

Is there a formula or equation I can use because it feels so simple yet i’m so far away!

The result should obviously be a string like 1/s, 10/s…
Thanks for the help.

Just take the multiplicative inverse of the time delta (or an average of time deltas). 1 / delta gives rate.

1 Like

oh, it was really that simple!
I feel kinda dumb for asking such a thing thanks for explaining :innocent:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.