Changeset 4108 for trunk/MagicSoft
- Timestamp:
- 05/20/04 06:43:00 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4101 r4108 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2004/05/19: Abelardo Moralejo 22 23 * mbase/MGMap.cc 24 - replaced rint by TMath::Nint() (my Mac did not recognize the 25 former) 20 26 21 27 2004/05/19: Abelardo Moralejo -
trunk/MagicSoft/Mars/mbase/MGMap.cc
r4081 r4108 252 252 y+= dy; 253 253 254 const Int_t iy = (int)rint(y);254 const Int_t iy = TMath::Nint(y); 255 255 if (iy<0 || iy>=h) 256 256 continue; 257 257 258 const Int_t ix = (int)rint(x);258 const Int_t ix = TMath::Nint(x); 259 259 if (ix<0 || ix>=w) 260 260 continue; … … 284 284 void MGMap::DrawCircle(UChar_t *buf, int w, int h, Float_t x, Float_t y, Float_t r, UChar_t col) 285 285 { 286 const Int_t n = (int)rint(sqrt(2.)*r*TMath::Pi()/2);286 const Int_t n = TMath::Nint(sqrt(2.)*r*TMath::Pi()/2); 287 287 for (int i=0; i<n-1; i++) 288 288 { … … 292 292 const Double_t dy = r*sin(angle); 293 293 294 const Int_t x1 = (int)rint(x+dx);295 const Int_t x2 = (int)rint(x-dx);296 297 const Int_t y1 = (int)rint(y+dy);294 const Int_t x1 = TMath::Nint(x+dx); 295 const Int_t x2 = TMath::Nint(x-dx); 296 297 const Int_t y1 = TMath::Nint(y+dy); 298 298 if (y1>=0 && y1<h) 299 299 { … … 305 305 } 306 306 307 const Int_t y2 = (int)rint(y-dy);307 const Int_t y2 = TMath::Nint(y-dy); 308 308 if (y2>=0 && y2<h) 309 309 { … … 323 323 void MGMap::DrawDot(UChar_t *buf, int w, int h, Float_t cx, Float_t cy, UChar_t col) 324 324 { 325 const Int_t x1 = (int)rint(cx);326 const Int_t y1 = (int)rint(cy);325 const Int_t x1 = TMath::Nint(cx); 326 const Int_t y1 = TMath::Nint(cy); 327 327 328 328 if (x1>=0 && y1>=0 && x1<w && y1<h)
Note:
See TracChangeset
for help on using the changeset viewer.