r3122 - trunk/data/qcsrc/menu-div0test/nexuiz
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Jan 10 07:23:29 EST 2008
Author: div0
Date: 2008-01-10 07:23:29 -0500 (Thu, 10 Jan 2008)
New Revision: 3122
Modified:
trunk/data/qcsrc/menu-div0test/nexuiz/slider_decibels.c
Log:
make dB more "stable" by rounding to multiples of 0.1 dB
Modified: trunk/data/qcsrc/menu-div0test/nexuiz/slider_decibels.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/slider_decibels.c 2008-01-10 12:00:53 UTC (rev 3121)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/slider_decibels.c 2008-01-10 12:23:29 UTC (rev 3122)
@@ -64,7 +64,7 @@
else if(v < 0.0005)
me.value = -1000000;
else
- me.value = ln(cvar(me.cvarName)) * 10 / LOG10;
+ me.value = 0.1 * floor(0.5 + 10.0 * ln(cvar(me.cvarName)) * 10 / LOG10);
}
void saveCvarsNexuizDecibelsSlider(entity me)
{
More information about the nexuiz-commits
mailing list