This is super useful. I'm sure the symmetrical implementation can be optimized a lot, but my math-fu was not strong enough today.
This module was too difficult to navigate with parameter types + ranges + implementation details.