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

Bug 213156

Summary: The terminal strings of SlidableAnchor create rounding errors
Product: [Modeling] GMF-Runtime Reporter: Stéphane Lizeray <lizeray>
Component: GeneralAssignee: Inbox <gmf.runtime.diagram-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: mariot.chauvin
Version: 2.0.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
fix for the rounding error none

Description Stéphane Lizeray CLA 2007-12-17 05:07:09 EST
Build ID: M20070921-1145

Steps To Reproduce:
SlidableAnchor a = new SlidableAnchor(null,new PrecisionPoint(0.1,0.1));
      
PrecisionPoint p = a.parseTerminalString(a.getTerminal());
System.out.println(p.preciseX);
Output is 0.10000000149011612

More information:
If you use double precision and not float precision in BaseSlidableAnchor.parseTerminalString and BaseSlidableAnchor.composeTerminalString then there is no rounding error. Output is 0.1
Comment 1 Stéphane Lizeray CLA 2007-12-17 05:08:29 EST
Created attachment 85375 [details]
fix for the rounding error
Comment 2 Mariot Chauvin CLA 2009-09-30 05:43:56 EDT

*** This bug has been marked as a duplicate of bug 237801 ***
Comment 3 Eclipse Webmaster CLA 2010-07-19 21:59:31 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Runtime was the original product and component for this bug