+ Reply to Thread
Results 1 to 6 of 6

Formula to check if an angle is between 2 others?

  1. #1
    Forum Contributor stockgoblin42's Avatar
    Join Date
    05-26-2011
    Location
    vancouver, canada
    MS-Off Ver
    Excel 2010
    Posts
    222

    Formula to check if an angle is between 2 others?

    given the 360 rollover, what formula can check if an angle is in the shorter distance between 2 others?
    Last edited by stockgoblin42; 06-18-2013 at 09:40 PM.
    live logic & long prosper

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Formula to check if an angle is between 2 others?

    Suppose the two angles are exactly 180 degrees apart?
    Gary's Student

  3. #3
    Forum Contributor stockgoblin42's Avatar
    Join Date
    05-26-2011
    Location
    vancouver, canada
    MS-Off Ver
    Excel 2010
    Posts
    222

    Re: Formula to check if an angle is between 2 others?

    then it's between them alright! ...and no, in my data, it can't be them.

    p.s. the two angles go to two adjacent points on a pentagon from it's center so the 180 case is impossible. The third point to check is a star arm outer point.
    Last edited by stockgoblin42; 06-18-2013 at 10:17 PM.

  4. #4
    Forum Contributor stockgoblin42's Avatar
    Join Date
    05-26-2011
    Location
    vancouver, canada
    MS-Off Ver
    Excel 2010
    Posts
    222

    Re: Formula to check if an angle is between 2 others?

    ex) which angle of:

    262.2254253
    86.49984542
    272.6640642
    97.43343078
    317.2262854

    is between the closer distance of:

    57.82515101
    273.6641175


    answer: 317.2262854

    how?

  5. #5
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Formula to check if an angle is between 2 others?

    Is my thinking correct??

    If the difference between the smaller angle and the larger angle is less than 180 degrees, the target angle must be between the values.
    If the difference between the smaller angle and the larger angle is greater than 180 degrees, then the target angle must either be between the larger and 360 or between the smaller and zero.

  6. #6
    Forum Contributor stockgoblin42's Avatar
    Join Date
    05-26-2011
    Location
    vancouver, canada
    MS-Off Ver
    Excel 2010
    Posts
    222

    Re: Formula to check if an angle is between 2 others?

    get shorter distance between the 2 points
    get shortest distances to 2 points from each canidate, add those 2 distances and the total that matches the shorter distance between the 2 points is it

    booyah!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1