Trigonometry.java 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * Write a description of class Trigonometry here.
  3. *
  4. * @author (your name)
  5. * @version (a version number or a date)
  6. */
  7. public class Trigonometry
  8. {
  9. /**
  10. * Constructor for objects of class Trigonometry
  11. */
  12. public Trigonometry()
  13. {
  14. }
  15. //sin
  16. public static double sin(double x){
  17. Console.currentNumber = Math.sin(x);
  18. return Console.currentNumber;
  19. }
  20. //cos
  21. public static double cos(double x){
  22. Console.currentNumber = Math.cos(x);
  23. return Console.currentNumber;
  24. }
  25. //tan
  26. public static double tan(double x){
  27. Console.currentNumber = Math.tan(x);
  28. return Console.currentNumber;
  29. }
  30. //inverse of sin
  31. public static double sinInverse(double x){
  32. Console.currentNumber = Math.asin(x);
  33. return Console.currentNumber;
  34. }
  35. //inverse of cos
  36. public static double cosInverse(double x){
  37. Console.currentNumber = Math.acos(x);
  38. return Console.currentNumber;
  39. }
  40. //inver of tan
  41. public static double tanInverse(double x){
  42. Console.currentNumber = Math.atan(x);
  43. return Console.currentNumber;
  44. }
  45. }