Examples of Point


Examples of progs.lib.Point

public class RobotMovement {

  @Test
  public void tests() {
    Solution solution = new Solution();
    Assert.assertEquals(6, solution.numPaths(new Point(0, 0), new Point(2, 2)));
    Assert.assertEquals(10, solution.numPaths(new Point(0, 0), new Point(2, 3)));
  }
View Full Code Here

Examples of purrpackagedemo.Point

  static Polygon tri, square;
 
  @BeforeSuite
  public static void setup() {
    tri = new Polygon( new Point( -1, -1 ), new Point( 0, 1 ), new Point( 1, -1 ) );
    square = new Polygon( new Point( -1, -1 ), new Point( -1, 1 ), new Point( 1, 1 ), new Point( 1, -1 ) );
  }
View Full Code Here

Examples of pythagoras.f.Point

            }
        });

        scroll.contentClicked().connect(new Slot<Pointer.Event>() {
            @Override public void onEmit (Event e) {
                Point pt = Layer.Util.screenToLayer(content.layer, e.x(), e.y());
                click.text.update(pt.x + ", " + pt.y);
            }
        });

        scroll.addListener(new Scroller.Listener() {
View Full Code Here

Examples of rinde.sim.core.graph.Point

  @Override
  public void renderDynamic(GC gc, ViewPort vp, long time) {
    final Set<Taxi> taxis = rm.get().getObjectsOfType(Taxi.class);
    synchronized (taxis) {
      for (final Taxi t : taxis) {
        final Point p = rm.get().getPosition(t);
        final int x = vp.toCoordX(p.x) - 5;
        final int y = vp.toCoordY(p.y) - 30;

        final VehicleState vs = pm.get().getVehicleState(t);
View Full Code Here

Examples of ru.dubov.primitives.Point

        boolean isClockwise = p.isClockwise();
       
        while (p.size() > 3) {
           
            int li = -1;
            Point l, v, r;
            Triangle tr;
            boolean isEar;
            int tryings = 0;
           
            do {
View Full Code Here

Examples of statistics.Point

    for (Point p : points) {
      BigDec pos[] = p.getPosition();
      for (int i = 0; i < reExpression.length; i++) {
        pos[i] = new BigDec(parser.run(reExpression[i].replaceAll("[xyz]", pos[i].toString())));
      }
      Point point = new Point(p);
      System.out.println(point.getPosition()[0] + " " + point.getPosition()[1]);
      point.setPosition(pos);
      reExpressed.add(point);
    }
    return reExpressed;
  }
View Full Code Here

Examples of trafficjams.model.util.Point

    public Point getCoord() {
        float p = element.getAbsolutePositionValue(value);
        float d = p / (element.getLength() - p);
        float x = (element.getFCross().getCoord().getX() + d * element.getLCross().getCoord().getX()) / (1+d) ;
        float y = (element.getFCross().getCoord().getY() + d * element.getLCross().getCoord().getY()) / (1+d) ;
        return new Point(x,y);
    }
View Full Code Here

Examples of tv.floe.metronome.clustering.kmeans.Point

  @Test
  public void test1() {
    double [] d1 = {0,0};
    double [] d2 = {3,4};
    Point p1 = new Point(d1);
    Point p2 = new Point(d2);
   
    DistanceMeasurer measurer = new DistanceMeasurer();
    assertEquals(5.0, measurer.distance(p1, p2), 0.0000000001);
    assertEquals(5.0, measurer.distance(p2, p1), 0.0000000001);
  }
View Full Code Here

Examples of worldManager.geom.Point

    public void addZone(Zone zone) {
        zone.setLastSimulationTime(gameScaleTime);
        zone.setGameEngine(this);

        zones.put(zone.getID(), zone);
        pointZones.put(new Point(zone.getColumn(), zone.getRow()), zone);

        if (zone.isEnable()) {
            executorService.submit(zone.createRunnable());
        }
    }
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.