Added inverse functions for speed. Might be usefull for someone that wants to make...
[supertux.git] / src / physic.cpp
index 232475d..243e8cf 100644 (file)
@@ -41,6 +41,16 @@ Physic::set_velocity(float nvx, float nvy)
     vy = -nvy;
 }
 
+void Physic::inverse_velocity_x()
+{
+vx = -vx;
+}
+
+void Physic::inverse_velocity_y()
+{
+vy = -vy;
+}
+
 float
 Physic::get_velocity_x()
 {