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