[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwin
Subject:    Re: float -> double
From:       Lubos Lunak <l.lunak () suse ! cz>
Date:       2007-07-20 11:25:09
Message-ID: 200707201325.09901.l.lunak () suse ! cz
[Download RAW message or body]

On Thursday 19 of July 2007, Rivo Laks wrote:
> Ühel kenal päeval (neljapäev 19 juuli 2007) kirjutas Lubos Lunak:
> > On Tuesday 17 of July 2007, Rivo Laks wrote:
> > > Ühel kenal päeval (teisipäev 17 juuli 2007) kirjutas Lubos Lunak:
> > > >  Hello,
> > > >
> > > >  I'd like to change all floats in the code to doubles. Floating point
> > > > constants are double by default in C/C++ and I've run into ugly
> > > > rounding errors because of mixing doubles and floats. Additionally,
> > > > considering things like
> > > > http://compilers.iecc.com/comparch/article/94-11-172, I think there's
> > > > really not much reason to use floats - anybody disagrees?
> > >
> > > OpenGL uses floats internally, so I'm not sure if it's a good idea.
> > > At least leave all OpenGL stuff (e.g. vertex coordinates, texcoords,
> > > etc) to be floats.
> >
> >  I don't think we need the added precision, but we shouldn't mix the two.
> > Since constants are doubles, every computation with a constant is a
> > double operation as well. Compiz seems to use floats, but also to
> > strictly use float constants like 1.5f, which I don't find very nice :-/
> > . Ok, which one would you prefer :) ?
>
> We should certainly use floats for GL stuff, so I'd prefer to use them.
> You're right about the float constants though, just 1.5 would be nicer...
> But if you don't want to mix them, I'd still rather prefer floats
> everywhere.

 Ok.

-- 
Lubos Lunak
KDE developer
--------------------------------------------------------------
SUSE LINUX, s.r.o.   e-mail: l.lunak@suse.cz , l.lunak@kde.org
Lihovarska 1060/12   tel: +420 284 028 972
190 00 Prague 9      fax: +420 284 028 951
Czech Republic       http//www.suse.cz
_______________________________________________
Kwin mailing list
Kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic