Math question: decrease one number by increasing another

Sorry if my question is quite silly, but my math imagination isn’t my best skill. I want to increase number when another is decreasing. I mean one float will increase its value while another will be decreasing. I don’t have idea how to do that :slight_smile: I’ve started experimenting with negative values and addition but I need positive value at the end.

Can some one help me with this? Thanks.

Where’s the problem?

You have a third variable (possibly const) containing the amount by which to change both other values. Then you subtract it from one value and add it to another.

1 Like

Right:) Thanks