33 const double fHalfStep(fStep * 0.5);
34 const double fChange(fHalfStep - fmod(
v + fHalfStep, fStep));
56 if(v < 0.0 || v > fWidth)
58 double fRetval(fmod(
v, fWidth));
86 std::swap(fLow, fHigh);
89 if(v < fLow || v > fHigh)
119 return v - (floor(
v/fRange)*fRange);
130 return v - (floor(
v/fRange)*fRange);
double snapToNearestMultiple(double v, const double fStep)
Snap v to nearest multiple of fStep, from negative and positive side.
double normalizeToRange(double v, const double fRange)
RotateFlyFrame3: Normalize to range defined by [0.0 ... fRange[, independent if v is positive or nega...
double snapToRange(double v, double fLow, double fHigh)
Snap v to the range [fLow .
double snapToZeroRange(double v, double fWidth)
Snap v to the range [0.0 .