import java.util.*; /** * Write a description of class Calculator here. * * @author (your name) * @version (a version number or a date) */ public class MathMethods { public static Double add(double n1, double n2){ return (n1 + n2); } public static Double subtract(double n1, double n2){ return (n1 - n2); } public static Double multiply(double n1, double n2){ return (n1 * n2); } public static Double divide(double n1, double n2){ return (n1 / n2); } public static Double exponent(double n1, double n2){ return (Math.pow(n1, n2)); } public static Double cosine(double n1){ return (Math.cos(n1)); } public static Double invCosine(double n1){ return (Math.acos(n1)); } public static double squareRoot(double n1) { return (Math.sqrt(n1)); } public static double invert(double n1) { return (n1*-1); } public static double sin(double n1){ return (Math.sin(n1)); } public static double iSin(double n1){ return (Math.asin(n1)); } public static double degToRad(double n1) { return (Math.toRadians(n1)); } public static double radToDeg(double n1) { return (Math.toDegrees(n1)); } public static double square(double n1) { return Math.pow(n1, 2); } public static double inverse(double n1) { return n1; } public static double tangent(double n1) { return Math.tan(n1); } public static double itan(double n1) { return Math.atan(n1); } public static void printAns(String printAnswer){ System.out.println("ANSWER: " + printAnswer); } } // public static double squareRoot(double n1) { // double result = Math.sqrt(x); // return result; // } // public static double invert(double n1) { // double result = x*-1; // return result; // } // public static double sin(double n1){ // double result = Math.sin(x); // return result; // } // public static double iSin(double n1){ // double result = Math.asin(x); // return result; // } // public static double degToRad(double n1) { // double result = Math.toRadians(x); // return result; // } // public static double radToDeg(double n1) { // double result = Math.toDegrees(x); // return result; // } // public static Double exponent(double n1, double n2){ // return (Math.pow(n1, n2)); // } // public static Double cosine(double n1){ // return (Math.cos(n1)); // } // public static Double invCosine(double n1){ // return (Math.acos(n1)); // }