Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:14:24

0001 #ifndef GEOMETRY_CSCGeometry_NINT_H_
0002 #define GEOMETRY_CSCGeometry_NINT_H_
0003 
0004 // From CommonDet/Utilities
0005 
0006 /// Return the nearest integer - analogous to the FORTRAN intrinsic NINT
0007 
0008 inline int nint(float a) { return a >= 0 ? int(a + 0.5) : int(a - 0.5); }
0009 inline int nint(double a) { return a >= 0 ? int(a + 0.5) : int(a - 0.5); }
0010 
0011 #endif