better rounding algorithm for wires