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 260833 Details for
Bug 491403
Enchancement for Point (getDifference)
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 to add getDifference method to Point
point-getdifference.patch (text/plain), 867 bytes, created by
Colin Sharples
on 2016-04-10 20:37:35 EDT
(
hide
)
Description:
Patch to add getDifference method to Point
Filename:
MIME Type:
Creator:
Colin Sharples
Created:
2016-04-10 20:37:35 EDT
Size:
867 bytes
patch
obsolete
>diff --git a/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Point.java b/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Point.java >index a10adf7..ed3360a 100644 >--- a/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Point.java >+++ b/org.eclipse.gef4.geometry/src/org/eclipse/gef4/geometry/planar/Point.java >@@ -483,6 +483,19 @@ > } > > /** >+ * Returns the translation required to move this {@link Point} to the other >+ * {@link Point} >+ * >+ * @param other >+ * the {@link Point} to get the difference from >+ * @return the translation required to move this {@link Point} to the other >+ * {@link Point} >+ */ >+ public Point getDifference(Point other) { >+ return new Point(other.x - x, other.y - y); >+ } >+ >+ /** > * Calculates the distance from this Point to the one specified. > * > * @param p
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:
nyssen
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 491403
: 260833 |
260873