28 #ifndef LSST_AFW_IMAGE_IMAGEUTILS_H
29 #define LSST_AFW_IMAGE_IMAGEUTILS_H
89 double roundedIndex =
std::floor(fullIndex + 0.5);
90 residual = fullIndex - roundedIndex;
91 return static_cast<int>(roundedIndex);
104 return std::pair<int, double>(ind, residual);
110 #endif // LSST_AFW_IMAGE_IMAGEUTILS_H
double indexToPosition(double ind)
Convert image index to image position.
int positionToIndex(double pos)
Convert image position to nearest integer index.
Extent< int, N > floor(Extent< double, N > const &input)
Return the component-wise floor (round towards more negative).
const double PixelZeroPos
position of center of pixel 0