Examples of normalize()


Examples of toxi.geom.Vec3D.normalize()

    float pLen = vecPosStart.distanceTo(vecPosEnd);

    Vec3D vecDir = new Vec3D(vecPosStart.x - vecPosEnd.x, vecPosStart.y
        - vecPosEnd.y, 0);
    vecDir = vecDir.normalize();

    Vec3D vecDirOffset = vecDir.copy();

    vecDirOffset.rotateZ((float) (Math.PI / 2));
View Full Code Here

Examples of vazkii.botania.common.core.helper.Vector3.normalize()

  public static void setEntityMotionFromVector(Entity entity, Vector3 originalPosVector, float modifier) {
    Vector3 entityVector = Vector3.fromEntityCenter(entity);
    Vector3 finalVector = originalPosVector.copy().subtract(entityVector);

    if(finalVector.mag() > 1)
      finalVector.normalize();

    entity.motionX = finalVector.x * modifier;
    entity.motionY = finalVector.y * modifier;
    entity.motionZ = finalVector.z * modifier;
  }
 
View Full Code Here

Examples of webit.script.loaders.Loader.normalize()

    }

    private Template createTemplateIfAbsent(final String name) throws ResourceNotFoundException {
        Template template;
        final Loader loader = this.resourceLoader;
        final String normalizedName = loader.normalize(name);
        if (normalizedName == null) {
            //if normalized-name is null means not found resource.
            throw new ResourceNotFoundException("Illegal template path: ".concat(name));
        }
        template = this.templateCache.get(normalizedName);
View Full Code Here

Examples of xbird.xquery.expr.flwr.FLWRExpr.normalize()

        returnExpr = parseExprSingle();
        flower.setReturnExpr(returnExpr);
        currentModule.popVarScope();
        {
            if(true)
                return flower.normalize();
        }
        throw new Error("Missing return statement in function");
    }

    /************************************************************************
 
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.