static DoublePt scaleDoublePt(DoublePt p, double f) { ret new DoublePt(p.x*f, p.y*f); }