I have the following math problem inside JavaScript.
The problem: As x decreases, I need y to decrease proportionately to x as y approaches 0%.
And so when x = 0%, y = 0%
.
<script type="text/javascript">
x = 0.50;
y = 0.30;
if (x < 0.50){
// set y here somehow to gradually increase
}
</script>