(Gast)
n/a Beiträge
|
Re: Nachbarn in 3 Dimensionen
13. Sep 2007, 23: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;
|
|
Zitat
|