   Intersection point between lines
  Hi,I'd like someone to have a look at two functions I created that calculate the intersection point between a line and a vertical line parallel to the y axis or a horizontal line parallel to the x axis respectively.The functions seemed to work but now I'm getting unexpected behaviour in my program and I believe one of these functions is the culprit.Any comments would be welcome.float _xIntersect(float y, const Line2f& line2) const{float A2 = line2.y2-line2.y1,   B2 = line2.x1-line2.x2,   C2 = A2*line2.x1 + B2*line2.y1;_ASSERT(A2 != 0);return(-(B2*y - C2)/A2);}float _yIntersect(float x, const Line2f& line2) const{//A1=1, B1=0, C1=x, det = B1float A2 = line2.y2-line2.y1,   B2 = line2.x1-line2.x2,   C2 = A2*line2.x1 + B2*line2.y1;_ASSERT(-B2 != 0);return((C2-A2*x)/B2);}[Edited by - hellraiser on September 14, 2007 11:18:41 PM]
  Just to say I've found out what the problem was and it is not related to any of these functions. They're working just fine!   