Is there any way to upscale one variable if another one goes up? (C#)

Alright, so the title doesn’t explain it very well: What I want to do is have for example float a that is set to 2f, and float b that is set to 1f. Every time float a goes up by one (so 3), float b should do the same (so 2).
Is there any command to do this?

of course :wink: