- Timestamp:
- Jul 1, 2009 1:51:22 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/QIAdvancedSlider.cpp
r21122 r21124 165 165 float l2 = log ((float)val)/log (2.0); 166 166 float snap = 1.0/l2 * 2; /* How much border around the current snaping value (%) */ 167 int newVal = pow ( 2,qRound (l2)); /* The value to snap on */167 int newVal = pow ((float)2, (int)qRound (l2)); /* The value to snap on */ 168 168 if (abs (newVal - val) < (snap * newVal)) /* Snap only if we are in a defined array */ 169 169 {
Note:
See TracChangeset
for help on using the changeset viewer.