| Summary: | Line.getDirectionCCW() is incorrect | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Colin Sharples <ctg> | ||||
| Component: | GEF Geometry | Assignee: | 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 | ||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=460754 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Thanks Colin, I released your patch to origin/master. Resolving as fixed in 4.0.0 M7. |
Created attachment 260835 [details] Patch for Line.getDirectionCCW() I submitted some enhancements for org.eclipse.gef4.geometry.planar.Line (#460754) some time ago. Unfortunately there was a typo in the getDirectionCCW() method. public Angle getDirectionCCW() { Point start = getP1(); Point end = getP2(); return Angle.fromRad(Math.atan2(end.y - start.y, end.x - start.y)); } The second parameter to Math.atan2() should be: end.x - start.x Patch attached. This contribution complies to the Eclipse Foundation Certificate of Origin.