Re: [Ekiga-devel-list] fence-like levelmeter



On Wed, 06 Sep 2006 09:50:37 +0200
thomas schorpp <t schorpp gmx de> wrote:

> 2.) code:
> 
> gint
> gtk_fencemeter4_get_index_by_level (gfloat level)
> {
>   /* FIXME i need some arithmetics */
>   if (level == 0.0)
>     return 0;
> 
>   if (level > 0.0 && level <= 0.25)
>     return 1;
> 
> > is float mandatory here? makes no sense since big 
> rounding steps.

I guess yes, maybe one wants a 5-bar meter in future, if the interface
takes floats, it's easier to change interlans. Okay, normally an int
between 0 and 100 should do it, too. Wasting memory - habbits :-)

J.

-- 
"One of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs" --Robert Firth



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]