Package org.zkoss.zss.engine

Examples of org.zkoss.zss.engine.Complex


    String e2 = "7777777777";
    assertEquals(e2, EngineeringFns.engineerBin2oct(o2, null));
  }
  public static void testEngineerComplex() {
    Object[] o = {new Double(3), new Double(4)};
    Complex e = new Complex(3, 4);
    assertEquals(e, EngineeringFns.engineerComplex(o, null));

    Object[] o1 = {new Double(3), new Double(4), "j"};
    Complex e1 = new Complex(3, 4, "j");
    assertEquals(e1, EngineeringFns.engineerComplex(o1, null));

    Object[] o2 = {new Double(0), new Double(1)};
    Complex e2 = new Complex(0, 1);
    assertEquals(e2, EngineeringFns.engineerComplex(o2, null));

    Object[] o3 = {new Double(1), new Double(0)};
    Complex e3 = new Complex(1, 0);
    assertEquals(e3, EngineeringFns.engineerComplex(o3, null));
  }
View Full Code Here


    String[] s = {"3+4i"};
    org.zkoss.zss.engine.Complex e = new org.zkoss.zss.engine.Complex(3, -4, "i");
    assertEquals(e, EngineeringFns.engineerImconjugate(s, null));
   
    String[] s1 = {"3+4j"};
    Complex e1 = new Complex(3, -4, "j");
    assertEquals(e1, EngineeringFns.engineerImconjugate(s1, null))
  }
View Full Code Here

    Complex e1 = new Complex(3, -4, "j");
    assertEquals(e1, EngineeringFns.engineerImconjugate(s1, null))
  }
  public static void testEngineerImcos() {
    String[] s = {"1+i"};
    Complex e = new Complex(0.8337300251311492, -0.9888977057628652);
    assertEquals(e, EngineeringFns.engineerImcos(s, null));
  }
View Full Code Here

    Complex e = new Complex(0.8337300251311492, -0.9888977057628652);
    assertEquals(e, EngineeringFns.engineerImcos(s, null));
  }
  public static void testEngineerImdiv() {
    String[] s = {"-238+240j", "10+24j"};
    Complex e = new Complex(4.999999999999999, 12, "j");
    assertEquals(e, EngineeringFns.engineerImdiv(s, null));
  }
View Full Code Here

    Complex e = new Complex(4.999999999999999, 12, "j");
    assertEquals(e, EngineeringFns.engineerImdiv(s, null));
  }
  public static void testEngineerImexp() {
    String[] s = {"1+i"};
    Complex e = new Complex(1.4686939399158854, 2.2873552871788427);
    assertEquals(e, EngineeringFns.engineerImexp(s, null));
  }
View Full Code Here

    Complex e = new Complex(1.4686939399158854, 2.2873552871788427);
    assertEquals(e, EngineeringFns.engineerImexp(s, null));
  }
  public static void testEngineerImln() {
    String[] s = {"3+4i"};
    Complex e = new Complex(1.6094379124341003, 0.9272952180016122);
    assertEquals(e, EngineeringFns.engineerImln(s, null));
  }
View Full Code Here

    Complex e = new Complex(1.6094379124341003, 0.9272952180016122);
    assertEquals(e, EngineeringFns.engineerImln(s, null));
  }
  public static void testEngineerImlog10() {
    String[] s = {"3+4i"};
    Complex e = new Complex(0.6989700043360187, 0.4027191962733731);
    assertEquals(e, EngineeringFns.engineerImlog10(s, null));   
  }
View Full Code Here

    Complex e = new Complex(0.6989700043360187, 0.4027191962733731);
    assertEquals(e, EngineeringFns.engineerImlog10(s, null));   
  }
  public static void testEngineerImlog2() {
    String[] s = {"3+4i"};
    Complex e = new Complex(2.321928094887362, 1.3378042124509761);
    assertEquals(e, EngineeringFns.engineerImlog2(s, null));
  }
View Full Code Here

    Complex e = new Complex(2.321928094887362, 1.3378042124509761);
    assertEquals(e, EngineeringFns.engineerImlog2(s, null));
  }
  public static void testEngineerImpower() {
    Object[] o = {"2+3i", new Integer(3)};
    Complex e = new Complex(-46.00000000000001, 9.000000000000009);
    assertEquals(e, EngineeringFns.engineerImpower(o, null));
  }
View Full Code Here

    Complex e = new Complex(-46.00000000000001, 9.000000000000009);
    assertEquals(e, EngineeringFns.engineerImpower(o, null));
  }
  public static void testEngineerImproduct() {
    String[] s = {"3+4i", "5-3i"};
    Complex e = new Complex(27, 11);
    assertEquals(e, EngineeringFns.engineerImproduct(s, null));
   
    Object[] o = {"1+2i", new Double(30)};
    Complex e1 = new Complex(30, 60);
    assertEquals(e1, EngineeringFns.engineerImproduct(o, null));
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.engine.Complex

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.