Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Mouse Rotation (CW or CCW)

Mouse Rotation (CW or CCW)

Scheduled Pinned Locked Moved C#
question
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HRiazi
    wrote on last edited by
    #1

    Hi; I want to know if there is a formula to determine if the user is moving the mouse clockwise or counter clockwise. If there is could you explain to me? Thanks Hadi

    L G Q E 4 Replies Last reply
    0
    • H HRiazi

      Hi; I want to know if there is a formula to determine if the user is moving the mouse clockwise or counter clockwise. If there is could you explain to me? Thanks Hadi

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Maybe this[^] will help

      led mike

      1 Reply Last reply
      0
      • H HRiazi

        Hi; I want to know if there is a formula to determine if the user is moving the mouse clockwise or counter clockwise. If there is could you explain to me? Thanks Hadi

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        Calculate the angle for a vector from the center point to the mouse pointer, and watch how the angle changes.

        --- b { font-weight: normal; }

        1 Reply Last reply
        0
        • H HRiazi

          Hi; I want to know if there is a formula to determine if the user is moving the mouse clockwise or counter clockwise. If there is could you explain to me? Thanks Hadi

          Q Offline
          Q Offline
          quiteSmart
          wrote on last edited by
          #4

          Hi, Get the x position of the mouse location. If the X attribute of the first position is less than the second, the mouse will bi moving clockwise, vica versa. Good luck jamil abou khalil

          1 Reply Last reply
          0
          • H HRiazi

            Hi; I want to know if there is a formula to determine if the user is moving the mouse clockwise or counter clockwise. If there is could you explain to me? Thanks Hadi

            E Offline
            E Offline
            ejuanpp
            wrote on last edited by
            #5

            Take three different sample points A, B, C visited by your mouse. Compute the vectors AB = v1 (v1x, v1y) , AC = v2 (v2x, v2y). Sign of v2x* v1y - v1x * v2y will tell you the result: positive = clockwise. 0 = aligned visited points negative ... Regards

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups