Package jscicalc.complex

Examples of jscicalc.complex.Complex$HTMLStringResult


   
    /**
     * Construct a Sum.
     */
    public Sum(){
  complex = new Complex(); //zero
  expressionList = new java.util.LinkedList<Expression>();
    }
View Full Code Here


     * Create a copy of this Sum.
     * @return a copy of this
     */
    public Sum clone(){
  Sum copy = new Sum();
  copy.complex = new Complex( complex.real(), complex.imaginary() );
  copy.expressionList = new java.util.LinkedList<Expression>();
  for( java.util.ListIterator<Expression>
     i = getExpressionList().listIterator(); i.hasNext(); ){
      copy.expressionList.add( i.next() );
  }
View Full Code Here

      if( !(getApplet().getValue() instanceof Complex) ){
    getApplet().requestFocusInWindow();
    return;
      }
      getApplet().pushHistory();
      Complex value = (Complex)(getApplet().getValue());
      if( getApplet().getMode() != 0 ){
    getApplet().setMode( pobject );
    getApplet().requestFocusInWindow();
    return;
      }
View Full Code Here

     * @param x The value (right of symbol)
     * @return The result of the operation
     */
    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      return c.atan().scale( iscale );
  } else {
      return x.atan( angleType );
  }
    }
View Full Code Here

     * @param x The value (right of symbol)
     * @return The result of the operation
     */
    public OObject function( OObject x ){
  if( x instanceof Complex ){
      Complex c = (Complex)x;
      if( scale != 1 && StrictMath.abs( c.imaginary() ) > 1e-6 )
    throw new RuntimeException( "Error" );
      if( scale != 1 && StrictMath.abs( c.real() ) > 1 )
    throw new RuntimeException( "Error" );
      return c.asin().scale( iscale );
  } else {
      return x.asin( angleType );
  }
    }
View Full Code Here

TOP

Related Classes of jscicalc.complex.Complex$HTMLStringResult

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.