GuiSlider.cxx File Reference

#include "GuiSlider.h"
#include <sigc++/sigc++.h>

Go to the source code of this file.

Functions

static void fix_bounds (float &min, float &max)

Function Documentation

static void fix_bounds ( float &  min,
float &  max 
) [static]

Definition at line 42 of file GuiSlider.cxx.

References MuELoss::e.

Referenced by GuiVSlider::DoRedraw(), and GuiHSlider::DoRedraw().

00043 {
00044     if (min > max) min = max;
00045 
00046     float eps = 1e-6;
00047     if (max - min < eps) {
00048         if (max == 0) max += eps;
00049         else            max += max*eps;
00050         if (min == 0) min -= eps;
00051         else            min -= min*eps;
00052     }
00053 
00054 }


Generated on 16 Apr 2018 for loon by  doxygen 1.6.1