As float approaches float

I would like to know if there is a way (in blueprint scripting) for me to change a variable based off how close another variable is to a number.

float A = 1
float B = 2
as A approaches 10, B approaches 14
(these are not the numbers I require they are just for example)

Is there an easy way for me to do this in the Unreal Engine.

I’m sorry for my bad phrasing, If you don’t understand the question please tell me.

Hard to say what you want. Could you try to explain it more?
You want to change a variable by the amount float A is away from 10 and float B is away from 14? Like float B is 12 away from 14 and therefore you change the first variable by 12? is this what you want?

As I said I am sorry, I am often bad at phrasing things.

In math there are limits. e.g. as x->20, y->∞
This is basically what I want to know if I can do (not using infinity obviously)

you want to limit the amount your float can have? if that’s what you want you can use a float clamp.

never mind I found another solution to my problem.
And I probably shouldn’t be trying to phrase things when I have been up since 4am

edit: lol didn’t finish sentence

don’t worry, maybe its just me not capable of understanding. :smiley: have a nice day

i think you are looking for this: