Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 3226)
+++ trunk/MagicSoft/Mars/Changelog	(revision 3227)
@@ -4,4 +4,10 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2004/01/18: Abelardo Moralejo
+
+    * mgui/MHexagon.cc
+      - added comment explaining the algorithm.
+
 
  2004/02/18: Hendrik Bartko
Index: trunk/MagicSoft/Mars/mgui/MHexagon.cc
===================================================================
--- trunk/MagicSoft/Mars/mgui/MHexagon.cc	(revision 3226)
+++ trunk/MagicSoft/Mars/mgui/MHexagon.cc	(revision 3227)
@@ -166,4 +166,12 @@
     const Double_t disthex = TMath::Sqrt(dx*dx + dy*dy);
 
+    //
+    // Now check if point is outside of hexagon; just check x coordinate
+    // in three coordinate systems: the default one, in which two sides of
+    // the hexagon are paralel to the y axis (see camera displays) and two 
+    // more, rotated with respect to that one by +- 60 degrees. The values
+    // 0.5 and 0.866025403784438597 are the sine and cosine of 60 degrees.
+    //
+
     if (TMath::Abs(dx) > fD/2.)
       return disthex;
