[xiph-commits] r12801 - trunk/sushivision
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Fri Mar 23 01:24:33 PDT 2007
Author: xiphmont
Date: 2007-03-23 01:24:32 -0700 (Fri, 23 Mar 2007)
New Revision: 12801
Modified:
trunk/sushivision/scale.c
Log:
Minor fix to scale depth determination in label generation; need to return max magnitude, not rint()
Modified: trunk/sushivision/scale.c
===================================================================
--- trunk/sushivision/scale.c 2007-03-23 08:19:28 UTC (rev 12800)
+++ trunk/sushivision/scale.c 2007-03-23 08:24:32 UTC (rev 12801)
@@ -303,7 +303,12 @@
}
int _sv_scalespace_decimal_exponent(_sv_scalespace_t *s){
- return rint(s->two_exponent*.3 + s->five_exponent*.7);
+ double val = s->two_exponent*.3 + s->five_exponent*.7;
+ if(val<0){
+ return (int)floor(val);
+ }else{
+ return (int)ceil(val);
+ }
}
double _sv_scalespace_label(_sv_scalespace_t *s, int num, char *buffer){
More information about the commits
mailing list