sbool rectIsSquareish(Rect r, double tolerance) { ret closeToOne(doubleRatio(r.w, r.h), tolerance); }