Re: NSBezierPath: angle of a line
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