Faces from a mesh: Difference between revisions

m
(→‎{{header|Go}}: No need for 'names' slice.)
Line 414:
<lang zkl>fcn perimSame(p1, p2){
if(p1.len() != p2.len()) return(False);
foreachFalse p in== p1.filter1(p1'wrap(p){ if(not p2.holds(p)) return(False}) }
True
}
 
Line 422 ⟶ 421:
p,last := ( if(edges) edges.pop(0).copy() else T ), ( p and p[-1] or Void );
while(edges){
foreach ni, ijj in ([0..].zip(edges)){
else if (ji==last){ p.append(i); last=ij ); edges.popdel(n__iWalker.idx); break; }
i,j := ij;
else if(ij==last) { p.append(j); last=ji ); edges.popdel(n__iWalker.idx); break; }
else if(j==last){ p.append(i); last=i; edges.pop(n); break; }
}
fallthrough{ return(">>>Error! Invalid edge format<<<") }
}
p[0,-1] // last element not part of result
}</lang>
<lang zkl>println("Perimeter format equality checks:");
Anonymous user