Math.cot() (Simulated functionality)

The cot() function is not available in JavaScript but can be simulated to aid in the porting of existing code.

The example demonstrates how to add the cot() method to the Math object to provide the capability to calculate cotangents.

Example code:

   // Add the cot function to the Math object
   function cot(aValue)
   return 1/Math.tan(aValue);
   // Register the new function
   Math.constructor.prototype.cot = cot;
   // Test the Math.cot() method

See also:Math.cosec(), Math.sec()