I have an equation for a parabolic curve intersecting a specified point, in my case, when the user clicked on the graph.
// this would typically be mouse coords on the graph var _target:Point = new Point(100, 50); public static function plot(x:Number, target:Point):Number{ return (x * x) / target.x * (target.y / target.x); }
This gives a graph like this:

I also have a series of line segments defined by the start and end coordinates:
startX:Number, startY:Number, endX:Number, endY:Number
I need to find if and where this curve intersects these segments (A):

If this helps, startX always < endX
I feel that there is a pretty direct way to do this, but I really donβt know what to look for, and I am not very good at βrightβ math, so actual code examples would be very appreciated.
UPDATE:
An intersection works for me, but my solution gives me the coordinate for the wrong side of the y axis.
Replacing my target coordinates with A and B, respectively, gives this equation for the graph:
(x * x) / A * (B/A)
This is the correct answer, but I want the second option. I managed to fix this by multiplying m by -1 before calculating and doing the same with the value x returned by the last calculation, but this seems like a hack.
DECISION:
public static function intersectsSegment(targetX:Number, targetY:Number, startX:Number, startY:Number, endX:Number, endY:Number):Point {