From 2e030f2bbb554bd8a2b824ae7151a63ab5a3cd9a Mon Sep 17 00:00:00 2001 From: the-r3aper7 Date: Tue, 12 Mar 2024 22:16:23 +0530 Subject: [PATCH] feat: add math/base/special/tand --- .../@stdlib/math/base/special/tand/README.md | 4 +-- .../math/base/special/tand/docs/repl.txt | 4 +-- .../base/special/tand/docs/types/index.d.ts | 36 +++++++++---------- .../math/base/special/tand/lib/index.js | 2 +- .../math/base/special/tand/lib/main.js | 18 +++++----- .../math/base/special/tand/package.json | 2 +- .../math/base/special/tand/test/test.js | 4 +-- 7 files changed, 35 insertions(+), 35 deletions(-) diff --git a/lib/node_modules/@stdlib/math/base/special/tand/README.md b/lib/node_modules/@stdlib/math/base/special/tand/README.md index d49dc32029c..9fab05792d4 100644 --- a/lib/node_modules/@stdlib/math/base/special/tand/README.md +++ b/lib/node_modules/@stdlib/math/base/special/tand/README.md @@ -20,7 +20,7 @@ limitations under the License. # tand -> Evaluate the [tangent][trigonometric-functions] of a degree. +> Computes the [tangent][trigonometric-functions] of an angle measured in degrees.
@@ -36,7 +36,7 @@ var tand = require( '@stdlib/math/base/special/tand' ); #### tand( x ) -Evaluates the [tangent][trigonometric-functions] of `x` (in degree). +Evaluates the [tangent][trigonometric-functions] of `x` (in degrees). ```javascript var v = tand( 0.0 ); diff --git a/lib/node_modules/@stdlib/math/base/special/tand/docs/repl.txt b/lib/node_modules/@stdlib/math/base/special/tand/docs/repl.txt index 8b80a8bbedf..bc572637609 100644 --- a/lib/node_modules/@stdlib/math/base/special/tand/docs/repl.txt +++ b/lib/node_modules/@stdlib/math/base/special/tand/docs/repl.txt @@ -1,11 +1,11 @@ {{alias}}( x ) - Computes the tangent of a degree. + Computes the tangent of an angle measured in degrees. Parameters ---------- x: number - Input value (in degree). + Input value (in degrees). Returns ------- diff --git a/lib/node_modules/@stdlib/math/base/special/tand/docs/types/index.d.ts b/lib/node_modules/@stdlib/math/base/special/tand/docs/types/index.d.ts index da76d7b9502..a4cfedee897 100644 --- a/lib/node_modules/@stdlib/math/base/special/tand/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/math/base/special/tand/docs/types/index.d.ts @@ -19,26 +19,26 @@ // TypeScript Version: 4.1 /** -* Evaluates the tangent of a degree. +* Computes the tangent of an angle measured in degrees * -* @param x - input value (in degree) +* @param x - input value (in degrees) * @returns tangent - * - * @example - * var v = tand( 0.0 ); - * // returns 0 - * - * @example - * var v = tand( 60 ); - * // returns ~1.73 - * - * @example - * var v = tand( 90 ); - * // returns Infinity - * - * @example - * var v = tand( NaN ); - * // returns NaN +* +* @example +* var v = tand( 0.0 ); +* // returns 0 +* +* @example +* var v = tand( 60 ); +* // returns ~1.73 +* +* @example +* var v = tand( 90 ); +* // returns Infinity +* +* @example +* var v = tand( NaN ); +* // returns NaN */ declare function tand( x: number ): number; diff --git a/lib/node_modules/@stdlib/math/base/special/tand/lib/index.js b/lib/node_modules/@stdlib/math/base/special/tand/lib/index.js index 51fcc9c9880..6e0e7c0a3eb 100644 --- a/lib/node_modules/@stdlib/math/base/special/tand/lib/index.js +++ b/lib/node_modules/@stdlib/math/base/special/tand/lib/index.js @@ -19,7 +19,7 @@ 'use strict'; /** -* Evaluate the tangent of a degree. +* Compute the tangent of an angle measured in degrees. * * @module @stdlib/math/base/special/tand * diff --git a/lib/node_modules/@stdlib/math/base/special/tand/lib/main.js b/lib/node_modules/@stdlib/math/base/special/tand/lib/main.js index 7a2f8919ac8..06d2b651801 100644 --- a/lib/node_modules/@stdlib/math/base/special/tand/lib/main.js +++ b/lib/node_modules/@stdlib/math/base/special/tand/lib/main.js @@ -21,16 +21,16 @@ // MODULES // var tan = require( '@stdlib/math/base/special/tan' ); -var isInteger = require('@stdlib/math/base/assert/is-integer'); -var deg2rad = require('@stdlib/math/base/special/deg2rad'); +var isInteger = require( '@stdlib/math/base/assert/is-integer' ); +var deg2rad = require( '@stdlib/math/base/special/deg2rad' ); // MAIN // /** -* Evaluates the tangent of a degree. +* Computes the tangent of an angle measured in degrees. * -* @param {number} x - input value (in degree) +* @param {number} x - input value (in degrees) * @returns {number} tangent * * @example @@ -52,21 +52,21 @@ var deg2rad = require('@stdlib/math/base/special/deg2rad'); function tand( x ) { var xRad; - if (x === Infinity || x === -Infinity) { + if ( x === Infinity || x === -Infinity ) { return NaN; } - if (isInteger(((x / 90) - 1) / 2)) { + if ( isInteger( ( ( x / 90 ) - 1 ) / 2 )) { return Infinity; } - if (isInteger((x / 90) / 2)) { + if ( isInteger( ( x / 90 ) / 2) ) { return 0; } - xRad = deg2rad(x); + xRad = deg2rad( x ); - return tan(xRad); + return tan( xRad ); } diff --git a/lib/node_modules/@stdlib/math/base/special/tand/package.json b/lib/node_modules/@stdlib/math/base/special/tand/package.json index 862a7cca837..03aceb10d01 100644 --- a/lib/node_modules/@stdlib/math/base/special/tand/package.json +++ b/lib/node_modules/@stdlib/math/base/special/tand/package.json @@ -1,7 +1,7 @@ { "name": "@stdlib/math/base/special/tand", "version": "0.0.0", - "description": "Evaluate the tangent of a degree.", + "description": "Computes the tangent of an angle measured in degrees", "license": "Apache-2.0", "author": { "name": "The Stdlib Authors", diff --git a/lib/node_modules/@stdlib/math/base/special/tand/test/test.js b/lib/node_modules/@stdlib/math/base/special/tand/test/test.js index f4379114fff..c735ffdf569 100644 --- a/lib/node_modules/@stdlib/math/base/special/tand/test/test.js +++ b/lib/node_modules/@stdlib/math/base/special/tand/test/test.js @@ -43,7 +43,7 @@ tape( 'main export is a function', function test( t ) { t.end(); }); -tape( 'the function computes the tangent (negative values)', function test( t ) { +tape( 'the function computes the tangent of an angle measured in degrees (negative values)', function test( t ) { var expected; var delta; var tol; @@ -67,7 +67,7 @@ tape( 'the function computes the tangent (negative values)', function test( t ) t.end(); }); -tape( 'the function computes the tangent (positive values)', function test( t ) { +tape( 'the function computes the tangent of an angle measured in degrees (positive values)', function test( t ) { var expected; var delta; var tol;