[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/input/scrollers axis_scroller.cxx,1.3
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/input/scrollers axis_scroller.cxx,1.3,1.4 |
Date: |
28 Oct 2002 22:40:25 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/input/scrollers
In directory dark:/tmp/cvs-serv2855/src/input/scrollers
Modified Files:
axis_scroller.cxx
Log Message:
corrected bug with angle handling
Index: axis_scroller.cxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/input/scrollers/axis_scroller.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- axis_scroller.cxx 28 Oct 2002 20:13:40 -0000 1.3
+++ axis_scroller.cxx 28 Oct 2002 22:40:23 -0000 1.4
@@ -19,6 +19,7 @@
#include <math.h>
#include <assert.h>
+#include "../../debug.hxx"
#include "../axis.hxx"
#include "axis_scroller.hxx"
@@ -71,8 +72,8 @@
{
(*it)->update(delta);
- x_delta += cos((*it)->get_angle()) * speed * delta *
(*it)->get_pos();
- y_delta += sin((*it)->get_angle()) * speed * delta *
(*it)->get_pos();
+ x_delta += cos((*it)->get_angle() * 3.14159265 / 180) * speed *
delta * (*it)->get_pos();
+ y_delta += sin((*it)->get_angle() * 3.14159265 / 180) * speed *
delta * (*it)->get_pos();
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/input/scrollers axis_scroller.cxx,1.3,1.4,
torangan <=