Package erjang

Examples of erjang.ENumber.doubleValue()


  static public ENumber pow(EObject o1, EObject o2)
  {
    ENumber n1 = o1.testNumber();
    ENumber n2 = o2.testNumber();
   
    double res = Math.pow(n1.doubleValue(), n2.doubleValue());
    return ERT.box(res);
  }
 
  @BIF
  public static ENumber sin(EObject val)
View Full Code Here


  @BIF
  public static ENumber sin(EObject val)
  {
    ENumber num;
    if ((num = val.testNumber()) != null) {
      return new EDouble(Math.sin(num.doubleValue()));
    }
    throw ERT.badarg(val);
  }
 
  @BIF
View Full Code Here

  @BIF
  public static ENumber cos(EObject val)
  {
    ENumber num;
    if ((num = val.testNumber()) != null) {
      return new EDouble(Math.cos(num.doubleValue()));
    }
    throw ERT.badarg(val);
  }
 
  @BIF
View Full Code Here

  @BIF
  public static ENumber tan(EObject val)
  {
    ENumber num;
    if ((num = val.testNumber()) != null) {
      return boxIfValid(Math.tan(num.doubleValue()), val);
    }
    throw ERT.badarg(val);
  }
 
  @BIF
View Full Code Here

  @BIF
  public static ENumber asin(EObject val)
  {
    ENumber num;
    if ((num = val.testNumber()) != null) {
      return boxIfValid(Math.asin(num.doubleValue()), val);
    }
    throw ERT.badarg(val);
  }
 
  @BIF
View Full Code Here

  @BIF
  public static ENumber acos(EObject val)
  {
    ENumber num;
    if ((num = val.testNumber()) != null) {
      return boxIfValid(Math.acos(num.doubleValue()), val);
    }
    throw ERT.badarg(val);
  }
 
  @BIF
View Full Code Here

  @BIF
  public static EDouble atan(EObject val)
  {
    ENumber num;
    if ((num = val.testNumber()) != null) {
      return boxIfValid(Math.atan(num.doubleValue()), val);
    }
    throw ERT.badarg(val);
  }
 
  @BIF
View Full Code Here

  @BIF
  public static EDouble sinh(EObject val)
  {
    ENumber num;
    if ((num = val.testNumber()) != null) {
      return boxIfValid(Math.sinh(num.doubleValue()), val);
    }
    throw ERT.badarg(val);
  }
 
  @BIF
View Full Code Here

  @BIF
  public static EDouble cosh(EObject val)
  {
    ENumber num;
    if ((num = val.testNumber()) != null) {
      return boxIfValid(Math.cosh(num.doubleValue()), val);
    }
    throw ERT.badarg(val);
  }
 
  @BIF
View Full Code Here

  @BIF
  public static EDouble tanh(EObject val)
  {
    ENumber num;
    if ((num = val.testNumber()) != null) {
      return boxIfValid(Math.tanh(num.doubleValue()), val);
    }
    throw ERT.badarg(val);
  }

  @BIF
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.