ELEC2645 (2018/19) / Mbed 2 deprecated el17m2h_public

Dependencies:   mbed

Revision:
10:e1d2289705ef
Parent:
9:5e53bca2a4c2
Child:
13:10851784af9a
--- a/Doodler/Doodler.h	Tue Apr 16 19:51:12 2019 +0000
+++ b/Doodler/Doodler.h	Wed Apr 17 15:19:58 2019 +0000
@@ -12,19 +12,24 @@
     ~Doodler();
     void init(int radius);
     void draw(N5110 &lcd);    
-    void update(Direction d, float mag, Vector2D current_vel);
-    Vector2D get_velocity();
-    Vector2D get_position(); 
-    void set_velocity(Vector2D v);
-    void set_position(Vector2D p);
+    void update(Direction d, float mag, float current_vel_x, double current_vel_y);
+    float get_velocity_x();
+    double get_velocity_y();
+    float get_position_x(); 
+    float get_position_y(); 
+    void set_velocity(float v_x, double v_y);
+    void set_position(float p_x, float p_y);
     
     
 private:
     int _radius;
-    Vector2D _pos;
-    Vector2D _velocity;
-    Vector2D _current_vel;
-    float _gravity;
-    float _up;
+    // since the velocity will be added, it will not be an integer so it cannot be a vector
+    float _pos_x;
+    float _pos_y;
+    // velocity needs to be float in order to decelerate
+    float _velocity_x;
+    double _velocity_y;
+    double _gravity;
+    double _up;
 };
 #endif
\ No newline at end of file