Examples of polarAngle()


Examples of jmt.engine.jaba.DPoint.polarAngle()

            g.setColor(Color.magenta);
            //Draw Arrow

            //The angle is calculete throw the rotator point
            DPoint rotator = new DPoint(p2.getX() - p.getX(), p2.getY() - p.getY());
            double angle = rotator.polarAngle();
            //The thestination point in not into the point but near the point
            int xPoint = (int) (p.getX() * scale) + tran_x + (int) (pointSize * Math.cos(angle));
            int yPoint = tran_y - (int) (p.getY() * scale) - (int) (pointSize * Math.sin(angle));

            g.drawLine(xPoint, yPoint, (int) (p2.getX() * scale) + tran_x, tran_y - (int) (p2.getY() * scale));
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.