Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions lib/node_modules/@stdlib/math/base/special/atan2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Compute the angle in the plane (in radians) between the positive x-axis and the ray from `(0,0)` to the point `(x,y)`.

<section class="intro">

The two-argument [arctangent][arctangent] function is defined as

<!-- <equation class="equation" label="eq:atan2_function" align="center" raw="\operatorname{atan2}(y, x) = \begin{cases} \arctan\!\left(\tfrac{y}{x}\right) & \textrm{if}\ x > 0 \\ \arctan\!\left(\tfrac{y}{x}\right) + \pi & \textrm{if}\ x < 0,\ y \geq 0 \\ \arctan\!\left(\tfrac{y}{x}\right) - \pi & \textrm{if}\ x < 0,\ y < 0 \\ +\tfrac{\pi}{2} & \textrm{if}\ x = 0,\ y > 0 \\ -\tfrac{\pi}{2} & \textrm{if}\ x = 0,\ y < 0 \end{cases}" alt="Two-argument arctangent function"> -->

```math
\mathop{\mathrm{atan2}}(y, x) = \begin{cases} \arctan\!\left(\tfrac{y}{x}\right) & \textrm{if}\ x > 0 \\ \arctan\!\left(\tfrac{y}{x}\right) + \pi & \textrm{if}\ x < 0,\ y \geq 0 \\ \arctan\!\left(\tfrac{y}{x}\right) - \pi & \textrm{if}\ x < 0,\ y < 0 \\ +\tfrac{\pi}{2} & \textrm{if}\ x = 0,\ y > 0 \\ -\tfrac{\pi}{2} & \textrm{if}\ x = 0,\ y < 0 \end{cases}
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand All @@ -35,19 +51,19 @@ var atan2 = require( '@stdlib/math/base/special/atan2' );
Computes the angle in the plane (in radians) between the positive x-axis and the ray from `(0,0)` to the point `(x,y)`.

```javascript
var v = atan2( 2.0, 2.0 ); // => atan(1.0)
var v = atan2( 2.0, 2.0 );
// returns ~0.785

v = atan2( 6.0, 2.0 ); // => atan(3.0)
v = atan2( 6.0, 2.0 );
// returns ~1.249

v = atan2( -1.0, -1.0 ); // => atan(1.0) - π
v = atan2( -1.0, -1.0 );
// returns ~-2.356

v = atan2( 3.0, 0.0 ); // => π/2
v = atan2( 3.0, 0.0 );
// returns ~1.571

v = atan2( -2.0, 0.0 ); // => -π/2
v = atan2( -2.0, 0.0 );
// returns ~-1.571

v = atan2( 0.0, 0.0 );
Expand Down Expand Up @@ -197,6 +213,8 @@ int main( void ) {

<section class="links">

[arctangent]: https://en.wikipedia.org/wiki/Inverse_trigonometric_functions

<!-- <related-links> -->

[@stdlib/math/base/special/atan]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/atan
Expand Down
24 changes: 21 additions & 3 deletions lib/node_modules/@stdlib/math/base/special/atan2d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Compute the angle in the plane (in degrees) between the positive x-axis and the ray from `(0,0)` to the point `(x,y)`.

<section class="intro">

The two-argument [arctangent][arctangent] function returning an angle in degrees is defined as

<!-- <equation class="equation" label="eq:atan2d_function" align="center" raw="\operatorname{atan2d}(y, x) = \frac{180}{\pi} \operatorname{atan2}(y, x) = \begin{cases} \frac{180}{\pi}\arctan\!\left(\tfrac{y}{x}\right) & \textrm{if}\ x > 0 \\ \frac{180}{\pi}\arctan\!\left(\tfrac{y}{x}\right) + 180 & \textrm{if}\ x < 0,\ y \geq 0 \\ \frac{180}{\pi}\arctan\!\left(\tfrac{y}{x}\right) - 180 & \textrm{if}\ x < 0,\ y < 0 \\ +90 & \textrm{if}\ x = 0,\ y > 0 \\ -90 & \textrm{if}\ x = 0,\ y < 0 \end{cases}" alt="Two-argument arctangent function in degrees"> -->

```math
\mathop{\mathrm{atan2d}}(y, x) = \frac{180}{\pi}\mathop{\mathrm{atan2}}(y, x) = \begin{cases} \frac{180}{\pi}\arctan\!\left(\tfrac{y}{x}\right) & \textrm{if}\ x > 0 \\ \frac{180}{\pi}\arctan\!\left(\tfrac{y}{x}\right) + 180 & \textrm{if}\ x < 0,\ y \geq 0 \\ \frac{180}{\pi}\arctan\!\left(\tfrac{y}{x}\right) - 180 & \textrm{if}\ x < 0,\ y < 0 \\ +90 & \textrm{if}\ x = 0,\ y > 0 \\ -90 & \textrm{if}\ x = 0,\ y < 0 \end{cases}
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand All @@ -35,13 +51,13 @@ var atan2d = require( '@stdlib/math/base/special/atan2d' );
Computes the angle in the plane (in degrees) between the positive x-axis and the ray from `(0,0)` to the point `(x,y)`.

```javascript
var v = atan2d( 2.0, 2.0 ); // => atand(1.0)
var v = atan2d( 2.0, 2.0 );
// returns ~45.0

v = atan2d( 6.0, 2.0 ); // => atand(3.0)
v = atan2d( 6.0, 2.0 );
// returns ~71.565

v = atan2d( -1.0, -1.0 ); // => atand(1.0) - 180.0
v = atan2d( -1.0, -1.0 );
// returns ~-135.0

v = atan2d( 3.0, 0.0 );
Expand Down Expand Up @@ -192,6 +208,8 @@ int main( void ) {

<section class="links">

[arctangent]: https://en.wikipedia.org/wiki/Inverse_trigonometric_functions

<!-- <related-links> -->

<!-- </related-links> -->
Expand Down
28 changes: 23 additions & 5 deletions lib/node_modules/@stdlib/math/base/special/atan2f/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Compute the angle in the plane (in radians) between the positive x-axis and the ray from `(0,0)` to the point `(x,y)` as a single-precision floating-point number.

<section class="intro">

The two-argument [arctangent][arctangent] function is defined as

<!-- <equation class="equation" label="eq:atan2_function" align="center" raw="\operatorname{atan2}(y, x) = \begin{cases} \arctan\!\left(\tfrac{y}{x}\right) & \textrm{if}\ x > 0 \\ \arctan\!\left(\tfrac{y}{x}\right) + \pi & \textrm{if}\ x < 0,\ y \geq 0 \\ \arctan\!\left(\tfrac{y}{x}\right) - \pi & \textrm{if}\ x < 0,\ y < 0 \\ +\tfrac{\pi}{2} & \textrm{if}\ x = 0,\ y > 0 \\ -\tfrac{\pi}{2} & \textrm{if}\ x = 0,\ y < 0 \end{cases}" alt="Two-argument arctangent function"> -->

```math
\mathop{\mathrm{atan2}}(y, x) = \begin{cases} \arctan\!\left(\tfrac{y}{x}\right) & \textrm{if}\ x > 0 \\ \arctan\!\left(\tfrac{y}{x}\right) + \pi & \textrm{if}\ x < 0,\ y \geq 0 \\ \arctan\!\left(\tfrac{y}{x}\right) - \pi & \textrm{if}\ x < 0,\ y < 0 \\ +\tfrac{\pi}{2} & \textrm{if}\ x = 0,\ y > 0 \\ -\tfrac{\pi}{2} & \textrm{if}\ x = 0,\ y < 0 \end{cases}
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand All @@ -35,19 +51,19 @@ var atan2f = require( '@stdlib/math/base/special/atan2f' );
Computes the angle in the plane (in radians) between the positive x-axis and the ray from `(0,0)` to the point `(x,y)` as a single-precision floating-point number.

```javascript
var v = atan2f( 2.0, 2.0 ); // => atanf( 1.0 )
var v = atan2f( 2.0, 2.0 );
// returns ~0.785

v = atan2f( 6.0, 2.0 ); // => atanf( 3.0 )
v = atan2f( 6.0, 2.0 );
// returns ~1.249

v = atan2f( -1.0, -1.0 ); // => atanf( 1.0 ) - π
v = atan2f( -1.0, -1.0 );
// returns ~-2.356

v = atan2f( 3.0, 0.0 ); // => π/2
v = atan2f( 3.0, 0.0 );
// returns ~1.571

v = atan2f( -2.0, 0.0 ); // => -π/2
v = atan2f( -2.0, 0.0 );
// returns ~-1.571

v = atan2f( 0.0, 0.0 );
Expand Down Expand Up @@ -191,6 +207,8 @@ int main( void ) {

<section class="links">

[arctangent]: https://en.wikipedia.org/wiki/Inverse_trigonometric_functions

<!-- <related-links> -->

<!-- </related-links> -->
Expand Down
16 changes: 16 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/cosm1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Compute `cos(x) - 1`.

<section class="intro">

The function computes `cos(x) - 1` accurately for small `x`

<!-- <equation class="equation" label="eq:cosm1_function" align="center" raw="y = \cos(x) - 1" alt="Cosine minus one"> -->

```math
y = \cos(x) - 1
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand Down
16 changes: 16 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/cosm1f/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Compute `cos(x) - 1`.

<section class="intro">

The function computes `cos(x) - 1` accurately for small `x`

<!-- <equation class="equation" label="eq:cosm1_function" align="center" raw="y = \cos(x) - 1" alt="Cosine minus one"> -->

```math
y = \cos(x) - 1
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand Down
18 changes: 18 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/cospi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Compute the [cosine][@stdlib/math/base/special/cos] of a number times [π][@stdlib/constants/float64/pi].

<section class="intro">

The function computes the [cosine][cosine] of a number scaled by `π`

<!-- <equation class="equation" label="eq:cospi_function" align="center" raw="y = \cos(\pi x)" alt="Cosine of pi times x"> -->

```math
y = \cos(\pi x)
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand Down Expand Up @@ -178,6 +194,8 @@ int main( void ) {

<section class="links">

[cosine]: https://en.wikipedia.org/wiki/Cosine

[@stdlib/constants/float64/pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float64/pi

<!-- <related-links> -->
Expand Down
18 changes: 18 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/cospif/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Compute the [cosine][@stdlib/math/base/special/cosf] of a number times [π][@stdlib/constants/float32/pi].

<section class="intro">

The function computes the [cosine][cosine] of a number scaled by `π`

<!-- <equation class="equation" label="eq:cospi_function" align="center" raw="y = \cos(\pi x)" alt="Cosine of pi times x"> -->

```math
y = \cos(\pi x)
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand Down Expand Up @@ -172,6 +188,8 @@ int main( void ) {

<section class="links">

[cosine]: https://en.wikipedia.org/wiki/Cosine

[@stdlib/constants/float32/pi]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/constants/float32/pi

[@stdlib/math/base/special/cosf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/cosf
Expand Down
20 changes: 20 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/sincos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Simultaneously compute the [sine][@stdlib/math/base/special/sin] and [cosine][@stdlib/math/base/special/cos] of an angle measured in radians.

<section class="intro">

The function simultaneously computes the [sine][sine] and [cosine][cosine] of a number

<!-- <equation class="equation" label="eq:sincos_function" align="center" raw="(y_s, y_c) = (\sin(x),\; \cos(x))" alt="Simultaneous sine and cosine"> -->

```math
(y_s, y_c) = (\sin(x),\; \cos(x))
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand Down Expand Up @@ -198,6 +214,10 @@ int main( void ) {

<section class="links">

[cosine]: https://en.wikipedia.org/wiki/Cosine

[sine]: https://en.wikipedia.org/wiki/Sine

<!-- <related-links> -->

[@stdlib/math/base/special/cos]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/cos
Expand Down
18 changes: 18 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/sincosd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Simultaneously compute the [sine][@stdlib/math/base/special/sind] and [cosine][@stdlib/math/base/special/cosd] of an angle measured in degrees.

<section class="intro">

The function simultaneously computes the [sine][trigonometric-functions] and [cosine][trigonometric-functions] of an angle measured in degrees

<!-- <equation class="equation" label="eq:sincosd_function" align="center" raw="(y_s, y_c) = \left(\sin\!\left(\frac{\pi x}{180}\right),\; \cos\!\left(\frac{\pi x}{180}\right)\right)" alt="Simultaneous sine and cosine of an angle in degrees"> -->

```math
(y_s, y_c) = \left(\sin\!\left(\frac{\pi x}{180}\right),\; \cos\!\left(\frac{\pi x}{180}\right)\right)
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand Down Expand Up @@ -191,6 +207,8 @@ int main( void ) {

<section class="links">

[trigonometric-functions]: https://en.wikipedia.org/wiki/Trigonometric_functions

[@stdlib/math/base/special/cosd]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/cosd

[@stdlib/math/base/special/sind]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/sind
Expand Down
18 changes: 18 additions & 0 deletions lib/node_modules/@stdlib/math/base/special/sincosdf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ limitations under the License.

> Simultaneously compute the [sine][@stdlib/math/base/special/sindf] and [cosine][@stdlib/math/base/special/cosdf] of a single-precision floating-point number (in degrees).

<section class="intro">

The function simultaneously computes the [sine][trigonometric-functions] and [cosine][trigonometric-functions] of an angle measured in degrees

<!-- <equation class="equation" label="eq:sincosd_function" align="center" raw="(y_s, y_c) = \left(\sin\!\left(\frac{\pi x}{180}\right),\; \cos\!\left(\frac{\pi x}{180}\right)\right)" alt="Simultaneous sine and cosine of an angle in degrees"> -->

```math
(y_s, y_c) = \left(\sin\!\left(\frac{\pi x}{180}\right),\; \cos\!\left(\frac{\pi x}{180}\right)\right)
```

<!-- </equation> -->

</section>

<!-- /.intro -->

<section class="usage">

## Usage
Expand Down Expand Up @@ -191,6 +207,8 @@ int main( void ) {

<section class="links">

[trigonometric-functions]: https://en.wikipedia.org/wiki/Trigonometric_functions

[@stdlib/math/base/special/cosdf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/cosdf

[@stdlib/math/base/special/sindf]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/math/base/special/sindf
Expand Down
Loading