Package plotter

Examples of plotter.DoubleDiffer


  public void testToLogicalX() {
    LinearXYAxis axis = new LinearXYAxis(XYDimension.X);
    axis.setSize(100, 10);
    axis.setStart(1);
    axis.setEnd(2);
    DoubleDiffer d = new DoubleDiffer(.0000001);
    d.assertClose(1, axis.toLogical(-1));
    d.assertClose(1.5, axis.toLogical(49));
    d.assertClose(2, axis.toLogical(99));

    axis.setSize(130, 10);
    axis.setStartMargin(10);
    axis.setEndMargin(20);
    d.assertClose(1, axis.toLogical(9));
    d.assertClose(1.5, axis.toLogical(59));
    d.assertClose(2, axis.toLogical(109));
  }
View Full Code Here


  public void testToLogicalXInverted() {
    LinearXYAxis axis = new LinearXYAxis(XYDimension.X);
    axis.setSize(100, 10);
    axis.setStart(2);
    axis.setEnd(1);
    DoubleDiffer d = new DoubleDiffer(.0000001);
    d.assertClose(2, axis.toLogical(-1));
    d.assertClose(1.5, axis.toLogical(49));
    d.assertClose(1, axis.toLogical(99));

    axis.setSize(130, 10);
    axis.setStartMargin(10);
    axis.setEndMargin(20);
    d.assertClose(2, axis.toLogical(9));
    d.assertClose(1.5, axis.toLogical(59));
    d.assertClose(1, axis.toLogical(109));
  }
View Full Code Here

    d.assertClose(1, axis.toLogical(109));
  }


  public void testToLogicalY() {
    DoubleDiffer d = new DoubleDiffer(.0000001);
    LinearXYAxis axis = new LinearXYAxis(XYDimension.Y);
    axis.setSize(10, 100);
    axis.setStart(1);
    axis.setEnd(2);
    d.assertClose(2, axis.toLogical(0));
    d.assertClose(1.5, axis.toLogical(50));
    d.assertClose(1, axis.toLogical(100));

    axis.setSize(10, 130);
    axis.setStartMargin(10);
    axis.setEndMargin(20);
    d.assertClose(2, axis.toLogical(20));
    d.assertClose(1.5, axis.toLogical(70));
    d.assertClose(1, axis.toLogical(120));
  }
View Full Code Here

    d.assertClose(1, axis.toLogical(120));
  }


  public void testToLogicalYInverted() {
    DoubleDiffer d = new DoubleDiffer(.0000001);
    LinearXYAxis axis = new LinearXYAxis(XYDimension.Y);
    axis.setSize(10, 100);
    axis.setStart(2);
    axis.setEnd(1);
    d.assertClose(1, axis.toLogical(0));
    d.assertClose(1.5, axis.toLogical(50));
    d.assertClose(2, axis.toLogical(100));

    axis.setSize(10, 130);
    axis.setStartMargin(10);
    axis.setEndMargin(20);
    d.assertClose(1, axis.toLogical(20));
    d.assertClose(1.5, axis.toLogical(70));
    d.assertClose(2, axis.toLogical(120));
  }
View Full Code Here

TOP

Related Classes of plotter.DoubleDiffer

Copyright © 2018 www.massapicom. 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.