gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] gnash ChangeLog server/character.cpp


From: zou lunkai
Subject: Re: [Gnash-commit] gnash ChangeLog server/character.cpp
Date: Thu, 24 Apr 2008 09:47:08 +0800

> +       * server/character.cpp: replacing rint with floor wasn't a
> +         good idea.

It is a good idea to me:) On my MSVC compiler environment, there no
rint() or round() functions at all.  I know replace it would trigger
some failures in our testsuite,  but mainly due to pixel coordinates
accurcy problem. And maybe those tests were just passed by luck.

Tried Google math.h, and seems both rint() and round() are not
functions from the standard library.  So it would be good if they can
be dropped someday...

--zou


On 4/17/08, Benjamin Wolsey <address@hidden> wrote:
> CVSROOT:        /sources/gnash
> Module name:    gnash
> Changes by:     Benjamin Wolsey <bwy>   08/04/17 09:12:57
>
> Modified files:
>        .              : ChangeLog
>        server         : character.cpp
>
> Log message:
>                * server/character.cpp: restore rint.
>
> CVSWeb URLs:
> http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6313&r2=1.6314
> http://cvs.savannah.gnu.org/viewcvs/gnash/server/character.cpp?cvsroot=gnash&r1=1.90&r2=1.91
>
> Patches:
> Index: ChangeLog
> ===================================================================
> RCS file: /sources/gnash/gnash/ChangeLog,v
> retrieving revision 1.6313
> retrieving revision 1.6314
> diff -u -b -r1.6313 -r1.6314
> --- ChangeLog   17 Apr 2008 08:22:35 -0000      1.6313
> +++ ChangeLog   17 Apr 2008 09:12:56 -0000      1.6314
> @@ -1,6 +1,8 @@
>  2008-04-17 Benjamin Wolsey <address@hidden>
>
>        * libbase/utf8.h: visibility...
> +       * server/character.cpp: replacing rint with floor wasn't a
> +         good idea.
>
>  2008-04-17 Benjamin Wolsey <address@hidden>
>
>
> Index: server/character.cpp
> ===================================================================
> RCS file: /sources/gnash/gnash/server/character.cpp,v
> retrieving revision 1.90
> retrieving revision 1.91
> diff -u -b -r1.90 -r1.91
> --- server/character.cpp        16 Apr 2008 21:05:26 -0000      1.90
> +++ server/character.cpp        17 Apr 2008 09:12:57 -0000      1.91
> @@ -237,7 +237,7 @@
>        {
>                double newx = fn.arg(0).to_number();
>                matrix m = ptr->get_matrix();
> -               
> m.set_x_translation(static_cast<int>(std::infinite_to_fzero(PIXELS_TO_TWIPS(newx))));
> +               
> m.set_x_translation(std::floor(std::infinite_to_fzero(PIXELS_TO_TWIPS(newx))));
>                ptr->set_matrix(m);
>                ptr->transformedByScript(); // m_accept_anim_moves = false;
>        }
> @@ -260,7 +260,7 @@
>        {
>                double newy = fn.arg(0).to_number();
>                matrix m = ptr->get_matrix();
> -               
> m.set_y_translation(static_cast<int>(std::infinite_to_fzero(PIXELS_TO_TWIPS(newy))));
> +               
> m.set_y_translation(std::floor(std::infinite_to_fzero(PIXELS_TO_TWIPS(newy))));
>                ptr->set_matrix(m);
>                ptr->transformedByScript(); // m_accept_anim_moves = false;
>        }
>
>
> _______________________________________________
> Gnash-commit mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gnash-commit
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]