Any mathmatecians out there? My brain hurts.

I’m having a pretty simple issue where I want a value to be multiplied depending on where it sits on a linear scale.

For example…

0.1 → Result = 0.1 * 1
0.2 → Result = 0.1 * 1.1
0.3 → Result = 0.1 * 1.2

0.8 → Result = 0.1 * 1.7
0.9 → Result = 0.1 * 1.8


:smiley: I will be so wrong on that but for your example do you mean something like:

0.1 * (0.9 + Value).

And Value is that 0.1, 0.2, …, 0.9

If not, then at least i need some explanation on what you are trying to achieve.
But i guess someone else will just answer this better >.<

These are just example numbers but I’d like to multiply X by Y adjusting Y depending on the value of X.

A = Answer

X = 0.1, Y = 1
A = 0.1 * 1

X = 0.2, Y = 1.1
A = 0.2 * 1.1

X = 0.3, Y = 1.2
A = 0.3 * 1.2

I’m trying to figure out an easy to way to do this. I can’t use specific numbers like in my example due to the complexity of the situation.

I’d just like Y to increase in multiplication when X increases in value.

You can use Lerp to interpolate a number within your range. If the scale is not linear than you would need to code your own function (using a look up table, for example).

A = X * Lerp(MinY, MaxY, X)

That worked perfectly cyberreality, thank you.

Awesome! Glad to be of help.

For this particular example, why not just do [float * (0.9 + float)]

EDIT: Ah, I see.

Well, in addition to mapping a range, you could also define a float curve. For a value, you specify a corresponding value… Then you just Get the value from the curve at that point (for multiplication… Or you could just simplify it and map an X value to the desired final Y value)