On Tue, 8 Oct 2002, Paul Golds wrote: > On Tue, Oct 08, 2002 at 12:11:38PM +0100, Shevek wrote: > > > d(x,y) = (x1 - y1)^2 + (x2 - y2)^2 + (x3 - y3)^2 > > The point being you don't need to square either, in which case you do get > > > a different ball. > > Surely you do need to square, or something with a (for example) difference
No, an absolute value is sufficient. > of 10 on x, -10 on y, and 0 on z evaluates to a d(x,y)= 10 + -10 + 0 = 0. > > A metric of zero should indicate a perfect match, and this happens whenever > dx+dy+dz = 0. > > Errr.. this is broken. > > Paul -- Shevek I am the Borg. sub AUTOLOAD{my$i=$AUTOLOAD;my$x=shift;$i=~s/^.*://;print"$x\n";eval qq{*$AUTOLOAD=sub{my\$x=shift;return unless \$x%$i;&{$x}(\$x);};};} foreach my $i (3..65535) { &{'2'}($i); }