public class LFTest {

  private static void printRange(LineFunction lf, double start, double end, double incr) {
    for (double x = start; x<end; x=x+incr) {
      System.out.println("" + x + " ==> " + lf.plotXtoY(x)) ;
    }
  }
  
  public static void main(String[] args) {
    LineFunction lf = new LineFunction() ;
    System.out.println(lf) ;
    lf.setSlope(1.0) ;
    lf.setIntercept(201) ;
    System.out.println(lf) ;
    System.out.println("Slope is " + lf.getSlope()) ;
    System.out.println("Intercept is " + lf.getIntercept()) ;
    for (double x = 10.0; x<15.0; x=x+0.5) {
      System.out.println("" + x + " ==> " + lf.plotXtoY(x)) ;
    }
    lf.setFromPoints(10, 20, 20, 50) ;
    System.out.println(lf) ;
    printRange(lf, 10.0, 15.0, 0.5) ;
    System.out.println("X intercept is " + lf.getInterceptX()) ;
    
    lf = new LineFunction(1.0, 201) ;
    System.out.println(lf) ;
  }
  
}