Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 491402

Summary: Enhancement for Angle (getDeltaCW/CCW and isClockwise)
Product: [Tools] GEF Reporter: Colin Sharples <ctg>
Component: GEF GeometryAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: 0.2.0   
Target Milestone: 4.0.0 (Neon) M7   
Hardware: PC   
OS: Windows NT   
Whiteboard:
Attachments:
Description Flags
Patch to add three methods to Angle
nyssen: iplog+
Test cases for Angle.getDeltaCCW, getDeltaCW and isClockwise nyssen: iplog+

Description Colin Sharples CLA 2016-04-10 20:33:52 EDT
Created attachment 260832 [details]
Patch to add three methods to Angle

I propose a minor enhancement to Angle to make it easier to calculate differences between two angles. There would be three methods involved:

getDeltaCW(Angle) - returns the difference between this and the supplied Angle in a clockwise direction, as a new Angle

getDeltaCCW(Angle) - as above in a counter-clockwise direction

isClockwise(Angle) - returns true if the smallest delta to the other Angle is in a clockwise direction from this Angle.
Comment 1 Colin Sharples CLA 2016-04-10 20:34:02 EDT
This contribution complies to the Eclipse Foundation Certificate of Origin.
Comment 2 Colin Sharples CLA 2016-04-11 17:35:33 EDT
Created attachment 260874 [details]
Test cases for Angle.getDeltaCCW, getDeltaCW and isClockwise
Comment 3 Alexander Nyßen CLA 2016-04-12 11:05:13 EDT
Thanks Colin. Could you please confirm that the second patch complies to the Eclipse Foundation Certificate of Origin as well?
Comment 4 Colin Sharples CLA 2016-04-12 15:39:14 EDT
The testcase patch complies to the Eclipse Foundation Certificate of Origin.
Comment 5 Alexander Nyßen CLA 2016-04-13 01:24:25 EDT
I released your patches to origin/master. Thanks for having contributed them.

Resolving this as fixed in 4.0.0 M7.