Logo Search packages:      
Sourcecode: inkscape version File versions

int NR::clamp3 ( int const   val  ) 

Clamps an integer value to a value between 0 and 255^3.

Returns:
0 if the value is smaller than 0, 255^3 (16581375) if it is greater than 255^3, else v
Parameters:
v the value to clamp

Definition at line 11 of file nr-filter-utils.cpp.

                          {
    if (val < 0) return 0;
    if (val > 16581375) return 16581375;
    return val;
}


Generated by  Doxygen 1.6.0   Back to index