if I have a range of floating point numbers, specifically this: min: 0.5 max: 1.5 How do I reverse the order of a selected place in the range?
For instance if I pic 1.5 I would want my result to be 0.5. 1 would get 1 (I think), 0.5 would get 1.5, and any number in between would correspond to this reverse ordering.
Note, that if you pick $x$ and $y$ is its reverse, then $x+y=2$ should hold. So, you can calculate the reverse by $$f(x)=2-x$$