return dist/2;
}
public void getEdgeScreenBounds(JGraphPane graphPane, LoopEdge edge, JPowerGraphRectangle edgeScreenRectangle) {
JPowerGraphPoint node = graphPane.getScreenPointForNode(edge.getFrom());
JPowerGraphRectangle rectangle = new JPowerGraphRectangle(0, 0, 0, 0);
graphPane.getNodeScreenBounds(edge.getFrom(), rectangle);
edgeScreenRectangle.width = rectangle.width/2 + Math.max(widthpad, rectangle.width/10);
edgeScreenRectangle.height = rectangle.height/2 + Math.max(heightpad, rectangle.height/10);
edgeScreenRectangle.x = node.x - edgeScreenRectangle.width + 2;