les conditions
<?php
// (smaller x) - (bigger x) = (x total distance)
if(x1 < x2) xdist = x1 - x2; // IF x1 is the smaller ...
else xdist = x2 - x1; // else (x2 is the smaller ...)
// same for y distance
if(y1 < y2) ydist = y1 - y2;
else ydist = y2 - y1;
sont un peu inutile, vu que les carrés vont régler ce problème.
#define DISTANCE(%1,%2,%3,%4,%5,% ) ( floatsqroot( ( %1-%4)*( %1-%4) + ( %2-%5)*( %2-%5) + ( %3-%6)*( %3-%6) ) )
à tester