package ga.deluded_fruitcakes_anonymous.velocityangles;

/**
 * Created by Isaac on 8/3/2016.
 */
public class Square {
  @Override
    public boolean onTouchEvent(MotionEvent e) {
        // MotionEvent reports input details from the touch screen
        // and other input controls. In this case, you are only
        // interested in events where the touch position changed.

        float x = e.getX();
        float y = e.getY();

        switch (e.getAction()) {
            case MotionEvent.ACTION_DOWN:
                Toast.makeText(getContext(), "Screen Touched at " + x + ", " + y, Toast.LENGTH_SHORT).show();

        }
}

@@ -113,16 +113,69 @@
 quare %7B%0A
+  float centerX, centerY%0A  float borderHeight = 300;%0A
   @Overr
@@ -477,24 +477,50 @@
 = e.getY();%0A
+    if(y %3E= borderHeight)%7B
 %0A        swi
@@ -655,20 +655,40 @@
 %22 + 
-x + %22, %22 + y
+(x-centerX) + %22, %22 + (y-centerY)
 , To
@@ -723,11 +723,12 @@
        %7D
+%7D
 %0A%7D%0A

Update Joystick.java