data-niklas / gestures

Gesture recognition in C
MIT License
3 stars 2 forks source link

Relative coordinates ? #1

Closed drhisham-code closed 3 years ago

drhisham-code commented 3 years ago

Does it require absolute or relative coordinates ?

data-niklas commented 3 years ago

gesture_start() takes any coordinates gesture_track() coordinates should be absolute, the x and y difference between the coordinates is calculated automatically

int xdif = x - gesture_recorder->x;
int ydif = y - gesture_recorder->y;

Keep in mind though, that the implementation could be improved, the linked list is inefficient (in comparison to other vector implementations)

drhisham-code commented 3 years ago

Thanks for answering quickly 😊