Re: NSBezierPath: angle of a line
Re: NSBezierPath: angle of a line
- Subject: Re: NSBezierPath: angle of a line
- From: Scott Thompson <email@hidden>
- Date: Wed, 13 Apr 2005 09:39:23 -0500
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 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