Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 251188 Details for
Bug 460754
Add getLength() method to Line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for Line.getLength() method
460754-Line-getLength.patch (text/plain), 704 bytes, created by
Colin Sharples
on 2015-02-28 18:19:09 EST
(
hide
)
Description:
Patch for Line.getLength() method
Filename:
MIME Type:
Creator:
Colin Sharples
Created:
2015-02-28 18:19:09 EST
Size:
704 bytes
patch
obsolete
>diff --git a/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Line.java b/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Line.java >index 612acff..363169e 100644 >--- a/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Line.java >+++ b/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Line.java >@@ -295,2 +295,13 @@ > >+ /** >+ * Calculates the distance between the two {@link Point}s representing the >+ * start and end points of this {@link Line} >+ * >+ * @see Point#getDistance(Point) >+ * @return the distance from P1 to P2 >+ */ >+ public double getLength() { >+ return getP1().getDistance(getP2()); >+ } >+ > // TODO: add specialized getOverlap()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
matthias.wienand
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 460754
:
251187
| 251188 |
251189
|
251190