# How do I diminishing returns formula?

0 favourites
• 6 posts
• I'm looking for a simple formula where i can set a current value, min value, and max value before the results starts to get diminishing returns.

Like this, where all values are between 0 - 1.0;

A + (B * current value)

example 0.2+(0.5*0.5) so here the min is A 0.2, and max is A+B so 0.7, so when the current value is 0 the result is 0.2, and when the current value is 1.0, the result is 0.7. Here at 0.5 the results in 0.45.

How would i introduce diminishing returns on results as the current value goes from 0 to 1.0?

• Is this what you have in mind?

In this example the lower bound is 0 and the upper is 10. 0.5 is how steep the curve is, a lower value makes it more extreme.

• if the value is going from 0 to 1, then you want a formula like:

A + (B*(1-current value))

you could add clamp() just to make sure the values don't get outside the range you want...

EDIT: on second thought, I am not sure I completely understand what you are looking for.

Oops, should be working now.

I should also have posted the formula along with the link, which is: (x ^ 0.5) * 10

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• For another example, here’s 1-x^5 and as x increases it drops faster, like other people have suggested.

• 6 posts