CMS 3D CMS Logo

Functions
nint.h File Reference

Go to the source code of this file.

Functions

int nint (double a)
 
int nint (float a)
 Return the nearest integer - analogous to the FORTRAN intrinsic NINT. More...
 

Function Documentation

◆ nint() [1/2]

int nint ( double  a)
inline

Definition at line 9 of file nint.h.

9 { return a >= 0 ? int(a + 0.5) : int(a - 0.5); }

References a, and createfilelist::int.

◆ nint() [2/2]

int nint ( float  a)
inline

Return the nearest integer - analogous to the FORTRAN intrinsic NINT.

Definition at line 8 of file nint.h.

8 { return a >= 0 ? int(a + 0.5) : int(a - 0.5); }

References a, and createfilelist::int.

Referenced by CSCSlantedWireGeometry::nearestWire(), and CSCNonslantedWireGeometry::nearestWire().

a
double a
Definition: hdecay.h:119
createfilelist.int
int
Definition: createfilelist.py:10