ansx = ((x3-x4) (x2y1- x1y2) - (x1-x2) (x4y3 - x3y4)) / ((x3-x4) (y1-y2) - (x1-x2) (y3-y4));
ansy= ((y3-y4) (y2x1 - y1x2) - (y1-y2) (y4x3 - y3x4)) / ((y3-y4) (x1-x2) - (y1-y2) (x3-x4));
//这是我见过最简洁的版本 (逃)