Examples of shortestPathX()


Examples of org.nlogo.agent.Turtle.shortestPathX()

    Double newx = argEvalDouble(context, 0);
    Double newy = argEvalDouble(context, 1);
    try {
      double xvalue = newx.doubleValue();
      double yvalue = newy.doubleValue();
      double x = turtle.shortestPathX(xvalue);
      double y = turtle.shortestPathY(yvalue);
      if (x != xvalue) {
        newx = Double.valueOf(x);
      }
      if (y != yvalue) {
View Full Code Here

Examples of org.nlogo.agent.Turtle.shortestPathX()

  public void perform_1(final Context context, double xvalue, double yvalue)
      throws LogoException {
    Turtle turtle = (Turtle) context.agent;
    try {
      turtle.xandycor(turtle.shortestPathX(xvalue),
          turtle.shortestPathY(yvalue));
    } catch (org.nlogo.api.AgentException e) {
      throw new EngineException(context, this,
          I18N.errorsJ().getN("org.nlogo.prim.etc._setxy.pointOutsideWorld", xvalue, yvalue));
    }
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.