Package net.phys2d.math

Examples of net.phys2d.math.Vector2f.distance()


    if (rightPoint != null) {
      dis1 = rightPoint.distance(start) - norm.length();
    }
    float dis2 = Float.MAX_VALUE;
    if (leftPoint != null) {
      dis2 = leftPoint.distance(start) - norm.length();
    }
   
    norm.normalise();
    float dis = Math.min(dis1,dis2);
   
View Full Code Here


    float f1 = 3.4028235E+38F;
    if (localVector2f3 != null)
      f1 = localVector2f3.distance(localVector2f1) - paramVector2f2.length();
    float f2 = 3.4028235E+38F;
    if (localVector2f4 != null)
      f2 = localVector2f4.distance(localVector2f1) - paramVector2f2.length();
    paramVector2f2.normalise();
    float f3 = Math.min(f1, f2);
    paramContact.setSeparation(-f3);
    paramContact.setPosition(paramVector2f1);
    paramContact.setNormal(paramVector2f2);
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.