]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Correction in the distance definition.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jan 2010 07:52:04 +0000 (07:52 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jan 2010 07:52:04 +0000 (07:52 +0000)
JETAN/AliKMeansClustering.cxx

index 478a07ce17b7e98377d7a6b0bdb65d0a70105df5..906a213d5906d97627154915f698dbbc5108cbd0 100755 (executable)
@@ -125,5 +125,5 @@ Double_t AliKMeansClustering::d(Double_t mx, Double_t my, Double_t x, Double_t y
     Double_t dx = TMath::Abs(mx-x);
     if (dx > TMath::Pi()) dx = 2. * TMath::Pi() - dx;
     
-    return (dx * dx + (my - y) * (my - y));
+    return (0.5*(dx * dx + (my - y) * (my - y)));
 }