[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool PencilTool.java,1.14,1.15
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2005-09-06 07:39:32
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17766/src/net/sourceforge/bprocessor/gl/tool Modified Files: PencilTool.java Log Message: Fixed bug in snap in PencilTool Index: PencilTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/PencilTool.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PencilTool.java 5 Sep 2005 14:42:05 -0000 1.14 --- PencilTool.java 6 Sep 2005 07:39:24 -0000 1.15 *************** *** 171,176 **** */ protected double round(double value) { ! int i = (int) value; ! if (Math.abs(i - value) < 0.3) { return Math.round(value); } else { --- 171,175 ---- */ protected double round(double value) { ! if (Math.abs(value - Math.round(value)) < 0.3) { return Math.round(value); } else { *************** *** 257,261 **** if (current.getId() == null) { snap(current); ! } return legal; --- 256,264 ---- if (current.getId() == null) { snap(current); ! Set vertices = VertexFacade.getInstance().findByLocation ! (current.getX(), current.getY(), current.getZ(), 0.0); ! if (!vertices.isEmpty()) { ! current = (Vertex) vertices.iterator().next(); ! } } return legal; |