I’m trying to write two inverse functions.
If we pass to function A value 10 it returns for example 4,86 and if we pass that number to function B it should give us back original 10.
I’m using something like this in function A:
output = sqrt(inputForA / range) * inputForA;
So is it possible to reverse it in function B and calculate inputForA only knowing output and range.
You just need to factor that equation to single out inputForA. Here are the algebraic steps:
output = sqrt(inputForA / range) * inputForA
output / inputForA = sqrt(inputForA / range)
sq(output) / sq(inputForA) = inputForA / range
range * sq(output) / sq(inputForA) = inputForA
range * sq(output) = cube(inputForA)
So the cube root of range times the output squared should give you your original input. I don’t have a good way of showing that in here though…