Einzelnen Beitrag anzeigen

Dax
(Gast)

n/a Beiträge
 
#4

Re: Nachbarn in 3 Dimensionen

  Alt 13. Sep 2007, 22:03
Delphi-Quellcode:
temp := Sqr(x2-x1) + Sqr(y2-y1) + Sqr(z2-z1);
Result := temp > 0 and temp <= 2;
Edit: ne, anders..
Delphi-Quellcode:
temp := Sqr(x2-x1) + Sqr(y2-y1) + Sqr(z2-z1);
Result := temp > 0 and temp <= 3;
  Mit Zitat antworten Zitat