I made an Android custom view that looks like a D-Pad (image below). Given the touched coordinate (x,y), rectangle width (w), and rectangle height (h), ignoring the white diagonal and rounded corners, could somebody help me how do I determine which triangle that the user touch?
Additional info: (0,0) is upper left corner