How get mouse in screen movement direction from both mouse and touch movements?

How get mouse in screen movement direction from both mouse and touch movements?
Im finding a lot of ways of getting the mouse movement, but cant find one that works with the touch and the mouse at the same time, the code has to work with desktop and mobile at the same time, do someone know how?

1 Like

To my knowledge, mouse functions work the same on both Mobile and Desktop.