Logo Search packages:      
Sourcecode: codeblocks version File versions  Download package

double wxPdfDocument::ForceRange ( double  value,
double  minValue,
double  maxValue 
) [static]

Forces a floating point number into a fixed range.

Parameters:
valuevalue to be forced into range
minValuelower limit
maxValueupper limit
Returns:
value conforming to the given range:
  • the minValue if the value falls below the lower limit
  • the value itself if it is within range
  • the maxValue if the value exceeds the upper limit

Definition at line 2221 of file pdfdoc.cpp.

Referenced by PutSpotColors(), and wxPdfColour::SetColor().

{
  if (value < minValue)
  {
    value = minValue;
  }
  else if (value > maxValue)
  {
    value = maxValue;
  }
  return value;
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index