• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBezierPath: angle of a line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBezierPath: angle of a line


  • Subject: Re: NSBezierPath: angle of a line
  • From: Ian was here <email@hidden>
  • Date: Wed, 13 Apr 2005 12:36:36 -0700 (PDT)
  • Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys

That worked great! Thank you.





--- Scott Thompson <email@hidden> wrote:
>
> On Apr 12, 2005, at 6:08 PM, Ian was here wrote:
>
> > I have a straight line created using an
> NSBezierPath.
> > This line has a point of origin that remains
> fixed,
> > and a current point that can be moved around it's
> > origin, changing the shape and size of the line.
> >
> > The issue I'm having is finding the angle of the
> line
> > as it's current point is moving around it's
> origin.
> > Does anyone know how to get the angle of a line?
>
> atan2(y2-y1,x2-x1)
>
> The resulting angle will be in radians.  To convert
> radians to
> degrees multiply by 180/pi
>
>



__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Rounded selection rectangles in NSTextView (was: NSBezierPath geometry question...)
  • Next by Date: Re: NSTimer question...
  • Previous by thread: Re: NSBezierPath: angle of a line
  • Next by thread: Binding to object at index in NSArrayController?
  • Index(es):
    • Date
    • Thread