forked from len0rd/rockbox
Take 2 at 'Consolidate all fixed point math routines in one library' (FS#10400) by Jeffrey Goode
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21664 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
427bf0b893
commit
802743a061
22 changed files with 754 additions and 755 deletions
|
@ -415,7 +415,7 @@ void calc_scales(void)
|
|||
for (i=1; i <= half_width; i++)
|
||||
{
|
||||
/* analog scale */
|
||||
y = (half_width/5)*flog(i*fx_log_factor);
|
||||
y = (half_width/5)*fp16_log(i*fx_log_factor);
|
||||
|
||||
/* better way of checking for negative values? */
|
||||
z = y>>16;
|
||||
|
@ -431,7 +431,7 @@ void calc_scales(void)
|
|||
k = nh2 - ( j * j );
|
||||
|
||||
/* fsqrt+1 seems to give a closer approximation */
|
||||
y_values[i-1] = LCD_HEIGHT - (fsqrt(k, 16)>>8) - 1;
|
||||
y_values[i-1] = LCD_HEIGHT - (fp_sqrt(k, 16)>>8) - 1;
|
||||
rb->yield();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue