Subato

Funktionen 2

class Second{
  static double monom(double a, double x, int e){
    return a*Math.pow(x,e);
  }

  static int signum(long x){
    return x<0? -1 : (x>0 ? 1 : 0);
  }

  static double flaeche(double r){
    return Math.PI*r*r;
  }

  static double umfang(double r){
    return Math.PI*2*r;
  }

  static double hoeheGleichschenklig(double a, double c){
    return Math.sqrt(a*a-c*c/4);
  }

  static double hypothenuse(double a, double b){
    return Math.sqrt(a*a+b*b);
  }

  static double hoeheRechtwinklig(double a, double b){
    return a*b/hypothenuse(a,b);
  }
}