How to Groovy: Advanced Math Functions

Groovy Advanced Math Fucntions!

                    

class GroovyTut {
static void main(String[] args) {

  // Advanced Math Functions
  def randNum = 5.0;

  // sin, cos, tan, asin, acos, atan, sinh, cosh, tanh
  println("Math.sin(0.8 * Math.PI) = " + (Math.sin(0.8 * Math.PI)));

  // Number to the power of e
  println("Math.log(5) = " + (Math.log(5)));
 
  // Base 10 logarithm
  println("Math.log10(5) = " + (Math.log10(5)));
 
  // Degrees and radians
  println("Math.toDegrees(Math.PI) = " + (Math.toDegrees(Math.PI)));
  println("Math.toRadians(80) = " + (Math.toRadians(80)));
  
 
    }
}