** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: projections.cpp,v 1.66 2001/03/13 14:53:44 kevin Exp $
+** $Id: projections.cpp,v 1.67 2001/03/18 18:08:25 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
// +1 is correct for frequency data, ndet-1 is correct for projections
int iDetCenter = (iNumDetWithZeros - 1) / 2; // index refering to L=0 projection
- if (iNumDetWithZeros % 2 == 0)
+ if (isEven (iNumDetWithZeros))
iDetCenter = (iNumDetWithZeros + 1) / 2;
// Calculates polar coordinates (view#, det#) for each point on phantom grid
#endif
pProjNew->m_detStart = -m_dViewDiameter / 2;
pProjNew->m_detInc = m_dViewDiameter / nDet;
- if (nDet % 2 == 0) // even
+ if (isEven (nDet)) // even
pProjNew->m_detInc = m_dViewDiameter / (nDet - 1);
ParallelRaysums parallel (this, ParallelRaysums::THETA_RANGE_NORMALIZE_TO_TWOPI);