Consider two lamps with the same maximum brightness but: the first lamp has a dial accepting discrete values ranging from 0 (off) to 360 (full brightness), and the second lamp has a dial accepting discrete values from 0 to 100.
Given any value for the first dial, how do I calculate the closest new value for the first dial such there exists a value for the second dial that results in exactly the same brightness?
For example, a value of 40 for the first lamp can be reduced to 36 so that the equivalent value of the second lamp is exactly 10.
$$ where $\lfloor \dots \rfloor$ is the floor function, and $\lceil \dots \rceil$ is the ceiling function. – Matti P. Aug 07 '20 at 12:49