Author: ArcRiley Date: 2008-02-07 03:55:04 -0500 (Thu, 07 Feb 2008) New Revision: 827
Added: trunk/pysoy/include/math.pxd Modified: trunk/pysoy/src/_core-osx/soy._core.pxd trunk/pysoy/src/_core-server/soy._core.pxd trunk/pysoy/src/_core-w32/soy._core.pxd trunk/pysoy/src/_core-x11/soy._core.pxd trunk/pysoy/src/scenes/Scene.pxi trunk/pysoy/src/scenes/soy.scenes.pyx Log: moved math functions to it's own .pxd Copied: trunk/pysoy/include/math.pxd (from rev 824, trunk/pysoy/src/_core-x11/soy._core.pxd) =================================================================== --- trunk/pysoy/include/math.pxd (rev 0) +++ trunk/pysoy/include/math.pxd 2008-02-07 08:55:04 UTC (rev 827) @@ -0,0 +1,23 @@ +# PySoy Math Declarations +# +# Copyright (C) 2006,2007,2008 PySoy Group +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see http://www.gnu.org/licenses +# +# $Id$ + +cdef extern from "math.h" : + long int lround (double x) + long int lroundf (float x) + float fabsf (float number) Modified: trunk/pysoy/src/_core-osx/soy._core.pxd =================================================================== --- trunk/pysoy/src/_core-osx/soy._core.pxd 2008-02-07 07:10:30 UTC (rev 826) +++ trunk/pysoy/src/_core-osx/soy._core.pxd 2008-02-07 08:55:04 UTC (rev 827) @@ -50,11 +50,3 @@ # _coreloop methods cdef void _render(self) cdef void _resize(self) - - -cdef extern from "math.h" : - long int lroundf (float x) - float fabsf (float number) - -cdef extern from "unistd.h" : - void usleep(unsigned long usec) Modified: trunk/pysoy/src/_core-server/soy._core.pxd =================================================================== --- trunk/pysoy/src/_core-server/soy._core.pxd 2008-02-07 07:10:30 UTC (rev 826) +++ trunk/pysoy/src/_core-server/soy._core.pxd 2008-02-07 08:55:04 UTC (rev 827) @@ -57,11 +57,3 @@ cdef int _height cdef void _render(self) cdef void _resize(self) - - -cdef extern from "math.h" : - long int lroundf (float x) - float fabsf (float number) - -cdef extern from "unistd.h" : - void usleep(unsigned long usec) Modified: trunk/pysoy/src/_core-w32/soy._core.pxd =================================================================== --- trunk/pysoy/src/_core-w32/soy._core.pxd 2008-02-07 07:10:30 UTC (rev 826) +++ trunk/pysoy/src/_core-w32/soy._core.pxd 2008-02-07 08:55:04 UTC (rev 827) @@ -70,8 +70,3 @@ cdef void _render(self) cdef void _resize(self, int _width, int _height) -cdef extern from "math.h" : - long int lround (double x) - long int lroundf (float x) - float fabsf (float number) - Modified: trunk/pysoy/src/_core-x11/soy._core.pxd =================================================================== --- trunk/pysoy/src/_core-x11/soy._core.pxd 2008-02-07 07:10:30 UTC (rev 826) +++ trunk/pysoy/src/_core-x11/soy._core.pxd 2008-02-07 08:55:04 UTC (rev 827) @@ -70,18 +70,3 @@ unsigned int, int, int ) cdef void _eventMotion ( self, glx.Time, int, int ) cdef void _eventWinClose ( self ) - - -cdef extern from "sys/time.h" : - cdef struct timeval : - long int tv_sec - long int tv_usec - int gettimeofday (timeval *tv, void *tz ) - -cdef extern from "math.h" : - long int lround (double x) - long int lroundf (float x) - float fabsf (float number) - -cdef extern from "unistd.h" : - void usleep(unsigned long usec) Modified: trunk/pysoy/src/scenes/Scene.pxi =================================================================== --- trunk/pysoy/src/scenes/Scene.pxi 2008-02-07 07:10:30 UTC (rev 826) +++ trunk/pysoy/src/scenes/Scene.pxi 2008-02-07 08:55:04 UTC (rev 827) @@ -103,7 +103,7 @@ _lapsTime = _time() - self._prevTime if _lapsTime < ode.dEpsilon : _lapsTime = ode.dEpsilon - _step = lround(_lapsTime / self._stepSize) + _step = math.lround(_lapsTime / self._stepSize) if _step > 12 : _step = 12 self._prevTime = self._prevTime + (_step * self._stepSize) Modified: trunk/pysoy/src/scenes/soy.scenes.pyx =================================================================== --- trunk/pysoy/src/scenes/soy.scenes.pyx 2008-02-07 07:10:30 UTC (rev 826) +++ trunk/pysoy/src/scenes/soy.scenes.pyx 2008-02-07 08:55:04 UTC (rev 827) @@ -25,6 +25,8 @@ 'by '+'$Author$'[9:-2] __version__ = 'Trunk (r'+'$Rev$'[6:-2]+')' +cimport math + from soy._internals cimport _time cimport soy.joints _______________________________________________ PySoy-SVN mailing list [email protected] http://www.pysoy.org/mailman/listinfo/pysoy-svn
