Help on mathematics 2

I need some help! I have a canvas and use the block “when canvas dragged”. I have a figure that I want to move either left, right, up or down with a swipe left, right, etc.

Now it is the case that you never swipe left or right exactly so that, for example, Y remains the same. So I have to find out whether more X or more Y has changed to move the figure up / down or left / right. I have an idea, but it doesn’t fully work, for example not when I swipe from right to left or from bottom to top. Unfortunately, I’m a math anti genius.

So, maybe someone is here to tell me the math formular?

1 Like

That’s my cup of tea. I’ll help you but right now I’m at work, trying to start this year the right way. I’ll be free in a couple of hours.

2 Likes

Can you please post what you tried already.

im bad at maths but i surely can help
but send shot of conditions used

google,brainly :rofl: