Lines Matching defs:c1
33 * \return x rounded to the nearest multiple of c1 plus c0.
36 * If c1==0 (and c0 is finite), then returns +/-inf. This makes grid spacing of zero
39 inline double round_to_nearest_multiple_plus(double x, double const c1, double const c0)
41 return floor((x - c0) / c1 + .5) * c1 + c0;
45 * \return x rounded to the lower multiple of c1 plus c0.
48 * If c1==0 (and c0 is finite), then returns +/-inf. This makes grid spacing of zero
51 inline double round_to_lower_multiple_plus(double x, double const c1, double const c0 = 0)
53 return floor((x - c0) / c1) * c1 + c0;
57 * \return x rounded to the upper multiple of c1 plus c0.
60 * If c1==0 (and c0 is finite), then returns +/-inf. This makes grid spacing of zero
63 inline double round_to_upper_multiple_plus(double x, double const c1, double const c0 = 0)
65 return ceil((x - c0) / c1) * c1 + c0;