I'm using Unity's animation curves which unfortunately only have an Evaluate function that given time gives the value. I want to create a method that does the opposite of that. value gives time. I looked at this post:
It may fail on a steep curve, you should change the condition to
speed >= c.Evaluate(mid - elipson) && speed <= c.Evaluate(mid elipson)