isUniqueEdge function
dynamic
isUniqueEdge(
- dynamic start,
- dynamic end,
- dynamic edges
Implementation
isUniqueEdge(start, end, edges) {
var hash1 = "${start.x},${start.y},${start.z}-${end.x},${end.y},${end.z}";
var hash2 = "${end.x},${end.y},${end.z}-${start.x},${start.y},${start.z}"; // coincident edge
if (edges.contains(hash1) == true || edges.contains(hash2) == true) {
return false;
} else {
edges.addAll([hash1, hash2]);
return true;
}
}