static LineThroughPoint perpendicularBisector(IDoublePt a, IDoublePt b) { DoublePt midpoint = doublePt((a.x_double()+b.x_double())/2, (a.y_double()+b.y_double())/2); double angle = atan2(b.y_double()-a.y_double(), a.x_double()-b.x_double()); ret LineThroughPoint(midpoint, angle); }