Package general.datastructures

Examples of general.datastructures.Vector2f.normalize()


    vec3.add(vec1);
    assertEquals(10, vec3.x(),0.0001);
    assertEquals(14, vec3.y(),0.0001);
   
    Vector2f vec4 = new Vector2f(4,0);
    vec4.normalize();
    assertEquals(1, vec4.length(), 0.0001);
    vec4.scale(3f);
    assertEquals(3, vec4.length(), 0.0001)
  }
 
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.