Let v:(xv(x)) .
Find any x such that v(x)[0;1] and that v(x) is equivalent to your desired volume.
Toggle playback Change volume
Toggle fullscreen

Volume Maths

This project is a submission to the first weekly challenge from r/badUIBattles. The prompt was to create the worst possible volume control. I settled with a volume control form where you have to solve an equation to set the volume.

The equations themselves are quadratic equations as of right now, as those are fairly easy to generate, although I could always change things up if I wanted to (I likely won't). The equations should always be solvable. If you can't set the right volume, that's a skill issue.

How to solve a quadratic equation

First, get a piece of paper. You could work without it, it's just more convenient this way. Write down the definition for v(x) and subtract your desired volume. That has to equal zero. Divide by the first quotient to get an equation in the form of x2+px+q=0.

You can now derive up to two real solutions: x=-p2+(p2)2-q and x=-p2-(p2)2-q. From there, calculate either, and you're done!

Reddit thread

Changelog

All the changes after 2025-10-10: