mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
46 lines
1.2 KiB
Markdown
46 lines
1.2 KiB
Markdown
---
|
|
layout: default
|
|
---
|
|
|
|
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|
|
|
|
<h1 id="function-csc">Function csc <a href="#function-csc" title="Permalink">#</a></h1>
|
|
|
|
Calculate the cosecant of a value, defined as `csc(x) = 1/sin(x)`.
|
|
|
|
For matrices, the function is evaluated element wise.
|
|
|
|
|
|
<h2 id="syntax">Syntax <a href="#syntax" title="Permalink">#</a></h2>
|
|
|
|
```js
|
|
math.csc(x)
|
|
```
|
|
|
|
<h3 id="parameters">Parameters <a href="#parameters" title="Permalink">#</a></h3>
|
|
|
|
Parameter | Type | Description
|
|
--------- | ---- | -----------
|
|
`x` | number | Complex | Unit | Array | Matrix | Function input
|
|
|
|
<h3 id="returns">Returns <a href="#returns" title="Permalink">#</a></h3>
|
|
|
|
Type | Description
|
|
---- | -----------
|
|
number | Complex | Array | Matrix | Cosecant of x
|
|
|
|
|
|
<h2 id="examples">Examples <a href="#examples" title="Permalink">#</a></h2>
|
|
|
|
```js
|
|
math.csc(2) // returns number 1.099750170294617
|
|
1 / math.sin(2) // returns number 1.099750170294617
|
|
```
|
|
|
|
|
|
<h2 id="see-also">See also <a href="#see-also" title="Permalink">#</a></h2>
|
|
|
|
[sin](sin.html),
|
|
[sec](sec.html),
|
|
[cot](cot.html)
|