I have two variables a and b which add up to 100. How do I set up a reactive declaration such that when a changes b changes to be 100 - a and vice versa? When I try something like
let total = 100;
$: a = total - b;
$: b = total - a;
I get a 'Cyclical dependency detected' error. Is there any way to get this done?