Package soc.qase.tools.vecmath

Examples of soc.qase.tools.vecmath.Vector2f


@param angle the angle to be converted
@return the 2D directional vector */
/*-------------------------------------------------------------------*/
  public static Vector2f degreesToVector2f(float angle)
  {
    return new Vector2f((float)Math.cos(Math.toRadians(angle)), (float)Math.sin(Math.toRadians(angle)));
  }
View Full Code Here


*  X and Y axes */
/*-------------------------------------------------------------------*/
  public Vector2f getDirectionalVelocity()
  {
    if(directionalVelocity == null)
      directionalVelocity = new Vector2f(getVelocity().getForward(), getVelocity().getRight());

    return directionalVelocity;
  }
View Full Code Here

TOP

Related Classes of soc.qase.tools.vecmath.Vector2f

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.