Changeset 3230 for trunk/MagicSoft/Mars/mgui/MHexagon.cc
- Timestamp:
- 02/18/04 16:40:01 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgui/MHexagon.cc
r3227 r3230 170 170 // in three coordinate systems: the default one, in which two sides of 171 171 // the hexagon are paralel to the y axis (see camera displays) and two 172 // more, rotated with respect to that one by +- 60 degrees. The values 173 // 0.5 and 0.866025403784438597 are the sine and cosine of 60 degrees. 172 // more, rotated with respect to that one by +- 60 degrees. 174 173 // 175 174 … … 177 176 return disthex; 178 177 179 const Double_t dx2 = dx*0.5 + dy*0.866025403784438597; 178 const static Double_t cos60 = TMath::Cos(60/kRad2Deg); 179 const static Double_t sin60 = TMath::Sin(60/kRad2Deg); 180 181 const Double_t dx2 = dx*cos60 + dy*sin60; 180 182 181 183 if (TMath::Abs(dx2) > fD/2.) 182 184 return disthex; 183 185 184 const Double_t dx3 = dx* 0.5 - dy*0.866025403784438597;186 const Double_t dx3 = dx*cos60 - dy*sin60; 185 187 186 188 if (TMath::Abs(dx3) > fD/2.)
Note:
See TracChangeset
for help on using the changeset viewer.