I'm starting to learn C # and I want to practice with vectors. I made a WPF application in which circles are created on PKM, and if you press and hold the LMB, they can be moved and when released, they should continue to move at the speed of the mouse pointer. I can't do it so that they continue to move at the right speed, it does not change. How can I find out the pointer speed? PS I tried to find out the vector by saving the previous coordinate and subtracting it from the past.
// ΠΏΡΠΈ ΠΎΡΠΏΡΡΠΊΠ°Π½ΠΈΠΈ ΠΌΡΡΠΈ Vector mousemove = new Vector(Mouse.GetPosition(main).X - lastpos.X, Mouse.GetPosition(main).Y - lastpos.Y); elipse[i].direction = mousemove / mousemove.Length; // elipse - ΠΊΠ»Π°ΡΡ, ΡΠΎΠ΄Π΅ΡΠΆΠ°ΡΠΈΠΉ ΠΊΡΡΠ³ (Elipse) ΠΈ Π²Π΅ΠΊΡΠΎΡ Π΅Π³ΠΎ Π΄Π²ΠΈΠΆΠ΅Π½ΠΈΡ (direction) //Π² ΡΠ°ΠΉΠΌΠ΅ΡΠ΅ lastpos = new Point(Mouse.GetPosition(main).X, Mouse.GetPosition(main).Y);