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. The Lounge
  3. angle between two points

angle between two points

Scheduled Pinned Locked Moved The Lounge
tutorial
19 Posts 14 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.
  • M marcoslav

    Suppose I know two points, How to compute a angle in degrees bwtween those two points.

    S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #2

    Random r = new Random() return r.Next(360); I think you need 3 points to have a more deterministic answer... [Edit] but tell me the difference between a pigeon and I will give you the correct answer!

    J 1 Reply Last reply
    0
    • S Super Lloyd

      Random r = new Random() return r.Next(360); I think you need 3 points to have a more deterministic answer... [Edit] but tell me the difference between a pigeon and I will give you the correct answer!

      J Offline
      J Offline
      Jeremy Falcon
      wrote on last edited by
      #3

      You just turned his post into a programming question! ;P Jeremy Falcon

      S 1 Reply Last reply
      0
      • M marcoslav

        Suppose I know two points, How to compute a angle in degrees bwtween those two points.

        J Offline
        J Offline
        Jorgen Sigvardsson
        wrote on last edited by
        #4

        Relative to what?

        1 Reply Last reply
        0
        • J Jeremy Falcon

          You just turned his post into a programming question! ;P Jeremy Falcon

          S Offline
          S Offline
          Super Lloyd
          wrote on last edited by
          #5

          Ho my.... too bad! :laugh:

          1 Reply Last reply
          0
          • M marcoslav

            Suppose I know two points, How to compute a angle in degrees bwtween those two points.

            W Offline
            W Offline
            Weiye Chen
            wrote on last edited by
            #6

            For a second i thought i was in the mfc forum as i remember seeing this post topic. I assume your intention is to ask a programming question, right?

            _ 1 Reply Last reply
            0
            • M marcoslav

              Suppose I know two points, How to compute a angle in degrees bwtween those two points.

              R Offline
              R Offline
              RichardBrock
              wrote on last edited by
              #7

              given two coordinates, i.e. startx & starty, endx & endy: double dAngle = (180 * (1 + atan2(endy-starty, endx-startx) / PI))-90;

              S C J 3 Replies Last reply
              0
              • W Weiye Chen

                For a second i thought i was in the mfc forum as i remember seeing this post topic. I assume your intention is to ask a programming question, right?

                _ Offline
                _ Offline
                _AK_
                wrote on last edited by
                #8

                caught ;P :-D Best Regards, Apurva Kaushal

                1 Reply Last reply
                0
                • R RichardBrock

                  given two coordinates, i.e. startx & starty, endx & endy: double dAngle = (180 * (1 + atan2(endy-starty, endx-startx) / PI))-90;

                  C Offline
                  C Offline
                  code frog 0
                  wrote on last edited by
                  #9

                  It would make sense that a cab driver would know this. Now we all want to know how much you'll charge us to take us on the traversal.:-D


                  "You have an arrow in your butt!" - Fiona:cool:
                  Welcome to CP in your language. Post the unicode version in My CP Blog [ ^ ] now.

                  People who don't understand how awesome Firefox is have never used CPhog[^]CPhog. The act of using CPhog (Firefox)[^] alone doesn't make Firefox cool. It opens your eyes to the possibilities and then you start looking for other things like CPhog (Firefox)[^] and your eyes are suddenly open to all sorts of useful things all through Firefox. - (Self Quote)

                  1 Reply Last reply
                  0
                  • R RichardBrock

                    given two coordinates, i.e. startx & starty, endx & endy: double dAngle = (180 * (1 + atan2(endy-starty, endx-startx) / PI))-90;

                    S Offline
                    S Offline
                    Super Lloyd
                    wrote on last edited by
                    #10

                    Whatever he was thinking, it's certainly not that! :( Think about it more! However you did have a good idea when assuming he was meaning the angle difference from the origin! I didn't even think of it!

                    1 Reply Last reply
                    0
                    • M marcoslav

                      Suppose I know two points, How to compute a angle in degrees bwtween those two points.

                      B Offline
                      B Offline
                      Brian Delahunty
                      wrote on last edited by
                      #11

                      Lets be pedantic... there is no angle as you didn't give a relative point which you want to calculate the angle against... so there is a straight line between the two points that has to be taken as the horizontal... I suppose one could argue that the angle is 0 then. Regards, Brian Dela :-) Blog^ Co-author of The Outlook Answer Book... Go on, order^ it today!

                      1 Reply Last reply
                      0
                      • M marcoslav

                        Suppose I know two points, How to compute a angle in degrees bwtween those two points.

                        A Offline
                        A Offline
                        Aryo Handono
                        wrote on last edited by
                        #12

                        To compute an angle, you need to specify atleast 3 points. Otherwise, there will be alot of posibble angle. "Courage choose who will follow, Fate choose who will lead" - Lord Gunner, Septerra Core "Press any key to continue, where's the ANY key ?" - Homer Simpsons Drinking gives me amazing powers of insight. I can solve all the worlds problems when drunk, but can never remember the solutions in the morning. - Michael P Butler to Paul Watson on 12/08/03

                        1 Reply Last reply
                        0
                        • M marcoslav

                          Suppose I know two points, How to compute a angle in degrees bwtween those two points.

                          D Offline
                          D Offline
                          Don Miguel
                          wrote on last edited by
                          #13

                          For two points, you can compute angle only in Celsius Degrees!! :->

                          1 Reply Last reply
                          0
                          • M marcoslav

                            Suppose I know two points, How to compute a angle in degrees bwtween those two points.

                            D Offline
                            D Offline
                            Don Miguel
                            wrote on last edited by
                            #14

                            I was tempted to start another subject, just to beat you, requesting the angle between one point. Finally, I just give up, because someone else coud beat me saying he need an agle between no points! :-D

                            P 1 Reply Last reply
                            0
                            • M marcoslav

                              Suppose I know two points, How to compute a angle in degrees bwtween those two points.

                              J Offline
                              J Offline
                              JCParker
                              wrote on last edited by
                              #15

                              Easy, point A ----- Point B angle is 180 since depending upon your vantage, you are either going or comming but if you return you are going or comming. Then the agnle of the dangle changes at Point C when leaving the bush toward the mountains of points D & E. Has that cleared up your answer?

                              1 Reply Last reply
                              0
                              • R RichardBrock

                                given two coordinates, i.e. startx & starty, endx & endy: double dAngle = (180 * (1 + atan2(endy-starty, endx-startx) / PI))-90;

                                J Offline
                                J Offline
                                Jorgen Sigvardsson
                                wrote on last edited by
                                #16

                                Not for all points...

                                1 Reply Last reply
                                0
                                • M marcoslav

                                  Suppose I know two points, How to compute a angle in degrees bwtween those two points.

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

                                  Your question is pointless

                                  1 Reply Last reply
                                  0
                                  • D Don Miguel

                                    I was tempted to start another subject, just to beat you, requesting the angle between one point. Finally, I just give up, because someone else coud beat me saying he need an agle between no points! :-D

                                    P Offline
                                    P Offline
                                    Peter Wone
                                    wrote on last edited by
                                    #18

                                    The angle between no points is NULL.

                                    D 1 Reply Last reply
                                    0
                                    • P Peter Wone

                                      The angle between no points is NULL.

                                      D Offline
                                      D Offline
                                      Don Miguel
                                      wrote on last edited by
                                      #19

                                      Thanks! And the angle between one point? Shouldn't be NULL too? Or maybe null... or is it 0 ?

                                      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