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 85375 Details for
Bug 213156
The terminal strings of SlidableAnchor create rounding errors
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]
fix for the rounding error
patch-slidable.txt (text/plain), 1.58 KB, created by
Stéphane Lizeray
on 2007-12-17 05:08:29 EST
(
hide
)
Description:
fix for the rounding error
Filename:
MIME Type:
Creator:
Stéphane Lizeray
Created:
2007-12-17 05:08:29 EST
Size:
1.58 KB
patch
obsolete
>Index: BaseSlidableAnchor.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.draw2d.ui/src/org/eclipse/gmf/runtime/draw2d/ui/figures/BaseSlidableAnchor.java,v >retrieving revision 1.3 >diff -u -r1.3 BaseSlidableAnchor.java >--- BaseSlidableAnchor.java 15 Aug 2007 15:43:08 -0000 1.3 >+++ BaseSlidableAnchor.java 17 Dec 2007 09:13:01 -0000 >@@ -98,9 +98,9 @@ > private String composeTerminalString(PrecisionPoint p) { > StringBuffer s = new StringBuffer(24); > s.append(TERMINAL_START_CHAR); // 1 char >- s.append((float)p.preciseX); // 10 chars >+ s.append(p.preciseX); // 10 chars > s.append(TERMINAL_DELIMITER_CHAR); // 1 char >- s.append((float)p.preciseY); // 10 chars >+ s.append(p.preciseY); // 10 chars > s.append(TERMINAL_END_CHAR); // 1 char > return s.toString(); // 24 chars max (+1 for safety, i.e. for string termination) > } >@@ -300,10 +300,10 @@ > */ > public static PrecisionPoint parseTerminalString(String terminal) { > try { >- return new PrecisionPoint(Float.parseFloat(terminal.substring( >+ return new PrecisionPoint(Double.parseDouble(terminal.substring( > terminal.indexOf(BaseSlidableAnchor.TERMINAL_START_CHAR) + 1, > terminal.indexOf(BaseSlidableAnchor.TERMINAL_DELIMITER_CHAR))), >- Float.parseFloat(terminal.substring(terminal >+ Double.parseDouble(terminal.substring(terminal > .indexOf(BaseSlidableAnchor.TERMINAL_DELIMITER_CHAR) + 1, > terminal.indexOf(BaseSlidableAnchor.TERMINAL_END_CHAR)))); > } catch (Exception e) {
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
Actions:
View
|
Diff
Attachments on
bug 213156
: 85375