ordered var %d $sqrt($calc($4 - $2)^2 + ($5 - $3)^2) | return $iif($1 = -d,%d,$calc(%d / 2))