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) ; }
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); }