Package def_classes

Examples of def_classes.Vector2D


  }

  public void updateMovement() {
    double speedX = -xRadius*(Math.sin(cycleDegree*Math.PI/180))*cycleStep*Math.PI/180;
    double speedY = yRadius*(Math.cos(cycleDegree*Math.PI/180))*cycleStep*Math.PI/180;
    Vector2D newVelocity = new Vector2D(speedX,speedY);
    //velocity.setX(speedX);
    //velocity.setY(speedY);
    setVelocity(newVelocity);
    cycleDegree += cycleStep;
    setMovement(getVelocity());
View Full Code Here


  public void updateMovement() {
    int dx = (cyclePosition2.getIntX() - cyclePosition1.getIntX())/2;
    int dy = (cyclePosition2.getIntY() - cyclePosition1.getIntY())/2;
    double speedX = dx*(Math.cos(cycleDegree*Math.PI/180))*cycleStep*Math.PI/180;
    double speedY = dy*(Math.cos(cycleDegree*Math.PI/180))*cycleStep*Math.PI/180;
    Vector2D newVelocity = new Vector2D(speedX,speedY);
    //velocity.setX(speedX);
    //velocity.setY(speedY);
    setVelocity(newVelocity);
    cycleDegree += cycleStep;
    setMovement(getVelocity());
View Full Code Here

TOP

Related Classes of def_classes.Vector2D

Copyright © 2018 www.massapicom. 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.