Example #1
0
 public RealWorldPosition convertSimulatedToRealPositions(SimulatedWorldPosition swp)
 {
     double x = oneDimSimToRealConvert(SimulationWorldSizeX, RealWorldSizeX, swp.x, RealWorldTopX);
     double y = oneDimSimToRealConvert(SimulationWorldSizeY, RealWorldSizeY, swp.y, RealWorldTopY);
     return new RealWorldPosition(x,y) ;
 }
Example #2
0
        private void assertSingleStoRTest(WorldProperties wp, int swpx, int swpy, double rwpx, double rwpy)
        {
            SimulatedWorldPosition swp = new SimulatedWorldPosition(swpx, swpy);

            RealWorldPosition rwp = wp.convertSimulatedToRealPositions(swp);
            Assert.AreEqual (rwp.x, rwpx);
            Assert.AreEqual (rwp.y, rwpy);
        }