Math.cosec() (Simulated functionality)

The cosec() 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 cosec() method to the Math object.

Example code:

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

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