Examples of mag2()


Examples of aspect.util.Vector3.mag2()

        Vector3[] cedges = c.getEdges();

        for (int i = 0; i < numEdges; i++) {
            for (int j = 0; j < c.numEdges; j++) {
                Vector3 cross = Vector3.cross(edges[i], cedges[j]);
                if (cross.mag2() != 0.0f) {
                    axes[pos++] = cross.normalize();
                } else {
                    axes[pos++] = null;
                }
            }
View Full Code Here

Examples of aspect.util.Vector3.mag2()

    }

    public void impel(Vector3 impulse, Vector3 point) {
        Vector3 angularImpulse = Vector3.cross(point, impulse);
       
        if (ent == null || angularImpulse.mag2() == 0.0f) {
            return;
        }
       
        impel(impulse);
        impelAngular(angularImpulse);
View Full Code Here

Examples of aspect.util.Vector3.mag2()

            impel(impulseN, pos1);
            rb2.impel(impulseN.negate(), pos2);

            // Frictional impulse
            Vector3 tangent = Vector3.cross(Vector3.cross(vr, normal), normal).normalize();
            if (tangent.mag2() == 0.0f) {
                return;
            }

            num = -Vector3.dot(vr.times(coefficientOfFriction), tangent);
            Vector3 t2 = tangent.times(f);
View Full Code Here

Examples of org.jwildfire.base.mathlib.Complex.Mag2()

    // approx (very good) of Li[n](z) for n > 1
    double vv = pAmount;
    Complex z = new Complex(pAffineTP.x, pAffineTP.y);
    z.Pow(zpow);
    z.Save();
    if (z.Mag2() > 250000.0 || N >= 20) { // no convergence, or N too big... When N is big then Li tends to z
      pVarTP.x += vv * z.re;
      pVarTP.y += vv * z.im;
      return;
    }

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.