1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /**
  2. * Write a description of class TrigFeatures here.
  3. *
  4. * @author (your name)
  5. * @version (a version number or a date)
  6. */
  7. public class TrigFeatures extends MainApplication
  8. {
  9. // instance variables - replace the example below with your own
  10. private int x;
  11. private double sinNumber;
  12. private double cosineNumber;
  13. private double tangentNumber;
  14. private double inverseSinNumber;
  15. private double inverseCosineNumber;
  16. private double inverseTangentNumber;
  17. private double radiansNumber;
  18. private double degreesNumber;
  19. /**
  20. * Constructor for objects of class TrigFeatures
  21. */
  22. public TrigFeatures()
  23. {
  24. // initialise instance variables
  25. x = 0;
  26. }
  27. /**
  28. * An example of a method - replace this comment with your own
  29. *
  30. * @param y a sample parameter for a method
  31. * @return the sum of x and y
  32. */
  33. public double sin(double sinThis)
  34. {
  35. sinNumber = Math.sin(sinThis);
  36. return sinNumber;
  37. }
  38. public double inverseSin(double inverseThisSin)
  39. {
  40. inverseSinNumber = 1 / Math.sin(inverseThisSin);
  41. return inverseSinNumber;
  42. }
  43. public double cos(double cosThis)
  44. {
  45. cosineNumber = Math.cos(cosThis);
  46. return cosineNumber;
  47. }
  48. public double inverseCos(double inverseThisCosine)
  49. {
  50. inverseCosineNumber = 1 / Math.cos(inverseThisCosine);
  51. return inverseCosineNumber;
  52. }
  53. public double tan(double tanThis)
  54. {
  55. tangentNumber = Math.tan(tanThis);
  56. return tangentNumber;
  57. }
  58. public double inverseTan(double inverseThisTan)
  59. {
  60. inverseTangentNumber = 1 / Math.tan(inverseThisTan);
  61. return inverseTangentNumber;
  62. }
  63. public double radians(double makeRadians)
  64. {
  65. radiansNumber = Math.toRadians(makeRadians);
  66. return radiansNumber;
  67. }
  68. public double degrees(double makeDegrees)
  69. {
  70. degreesNumber = Math.toRadians(makeDegrees);
  71. return degreesNumber;
  72. }
  73. }