SpriteSheetPacker/PolygonImage.cpp
/** Clamp a value between from and to.
 */
Clamp a value between from and to.
Clamp a value between from and to .
inline float clampf(float value, float min_inclusive, float max_inclusive)
{
    if (min_inclusive > max_inclusive) {
        std::swap(min_inclusive, max_inclusive);
    }
    return value < min_inclusive ? min_inclusive : value < max_inclusive? value : max_inclusive;
}
inline float clampf ( float value , float min_inclusive , float max_inclusive ) { if ( min_inclusive > max_inclusive ) { std :: swap ( min_inclusive , max_inclusive ) ; } return value < min_inclusive ? min_inclusive : value < max_inclusive ? value : max_inclusive ; }
Clamp a value between from and to.
Clamp a value between from and to .