forked from: Node Proximity / Distance Formula

