Package org.zkoss.zss.engine

Examples of org.zkoss.zss.engine.Complex


    double e = 6;
    assertEquals(e, CommonFns.toNumber(EngineeringFns.engineerImreal(s, null)).doubleValue(), 0d);
  }
  public static void testEngineerImsin() {
    String[] s = {"3+4i"};
    Complex e = new Complex(3.853738037919377, -27.016813258003932);
    assertEquals(e, EngineeringFns.engineerImsin(s, null));
  }
View Full Code Here


    Complex e = new Complex(3.853738037919377, -27.016813258003932);
    assertEquals(e, EngineeringFns.engineerImsin(s, null));
  }
  public static void testEngineerImsqrt() {
    String[] s = {"1+j"};
    Complex e = new Complex(1.09868411346781, 0.45508986056222733, "j");
    assertEquals(e, EngineeringFns.engineerImsqrt(s, null));
  }
View Full Code Here

    Complex e = new Complex(1.09868411346781, 0.45508986056222733, "j");
    assertEquals(e, EngineeringFns.engineerImsqrt(s, null));
  }
  public static void testEngineerImsub() {
    String[] s = {"13+4i","5+3i"};
    Complex e = new Complex(8, 1);
    assertEquals(e, EngineeringFns.engineerImsub(s, null));
  }
View Full Code Here

    Complex e = new Complex(8, 1);
    assertEquals(e, EngineeringFns.engineerImsub(s, null));
  }
  public static void testEngineerImsum() {
    String[] s = {"3+4i","5-3i"};
    Complex e = new Complex(8, 1);
    assertEquals(e, EngineeringFns.engineerImsum(s, null));
  }
View Full Code Here

   * return {@link SSError#NAME} if complex is not a format of complex.
   * @param complex String value to be validated.
   * @return complex value.
   */
  public static Complex validateComplex(String complex) {
    Complex result = null;
    String s = "i";
    int i = complex.indexOf(s);
    if(i == -1) {
      s = "j";
      i = complex.indexOf(s);
View Full Code Here

   * @param c the complex.
   * @param suffix the suffix.
   * @return the complex.
   */
  public static Complex cToComplex(org.apache.commons.math.complex.Complex c, String suffix) {
    Complex result = new Complex(c.getReal(), c.getImaginary(), suffix);
    return result;
  }
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.