API Docs for: 1.0.0
Show:

File: src/gallery-mathcanvas/js/Arccosine.js

  1. /**
  2. * @module gallery-mathcanvas
  3. */
  4.  
  5. /**********************************************************************
  6. * <p>Inverse trigonometric cosine.</p>
  7. *
  8. * @namespace MathFunction
  9. * @class Arccosine
  10. * @extends MathFunction.FunctionWithArgs
  11. * @constructor
  12. * @param f {MathFunction}
  13. */
  14.  
  15. function MathArccosine(
  16. /* MathFunction */ f)
  17. {
  18. MathArccosine.superclass.constructor.call(this, MathArccosine.NAME, f);
  19. }
  20.  
  21. MathArccosine.NAME = 'arccos';
  22.  
  23. Y.extend(MathArccosine, MathFunctionWithArgs,
  24. {
  25. /**
  26. * @method evaluate
  27. * @param var_list {Object} map of variable names to values or MathFunctions
  28. * @return the value of the function
  29. */
  30. evaluate: function(
  31. /* map */ var_list)
  32. {
  33. return Math.acos(this.args[0].evaluate(var_list));
  34. }
  35. });
  36.  
  37. MathFunction.Arccosine = MathArccosine;
  38.  
  39. MathFunction.name_map[ MathArccosine.NAME ] =
  40. {
  41. applyTo: function(f)
  42. {
  43. return new MathArccosine(f);
  44. }
  45. };
  46.