Skip to content

Commit 12c2de9

Browse files
committed
Update namespace
1 parent 5dc7e3a commit 12c2de9

File tree

3 files changed

+12
-0
lines changed
  • lib/node_modules/@stdlib

3 files changed

+12
-0
lines changed

lib/node_modules/@stdlib/namespace/lib/namespace/b.js

+10
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,16 @@ ns.push({
516516
]
517517
});
518518

519+
ns.push({
520+
'alias': 'base.clamp',
521+
'path': '@stdlib/math/base/special/clamp',
522+
'value': require( '@stdlib/math/base/special/clamp' ),
523+
'type': 'Function',
524+
'related': [
525+
'@stdlib/math/base/special/wrap'
526+
]
527+
});
528+
519529
ns.push({
520530
'alias': 'base.cinv',
521531
'path': '@stdlib/math/base/complex/inv',

lib/node_modules/@stdlib/repl/code-blocks/lib/db.js

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ module.exports = {
6161
"base.ceiln": "\n// Round to 2 decimal places:\ny = base.ceiln( 3.14159, -2 )\n\n// If `n = 0`, standard round toward positive infinity behavior:\ny = base.ceiln( 3.14159, 0 )\n\n// Round to nearest thousand:\ny = base.ceiln( 12368.0, 3 )\n",
6262
"base.ceilsd": "y = base.ceilsd( 3.14159, 5 )\ny = base.ceilsd( 3.14159, 1 )\ny = base.ceilsd( 12368.0, 2 )\ny = base.ceilsd( 0.0313, 2, 2 )\n",
6363
"base.cfloor": "out = base.cfloor( 5.5, 3.3 )\n\n// Provide an output array:\nout = new Float64Array( 2 );\nv = base.cfloor( out, 5.5, 3.3 )\nbool = ( v === out )\n",
64+
"base.clamp": "y = base.clamp( 3.14, 0.0, 5.0 )\ny = base.clamp( -3.14, 0.0, 5.0 )\ny = base.clamp( 3.14, 0.0, 3.0 )\ny = base.clamp( -0.0, 0.0, 5.0 )\ny = base.clamp( 0.0, -3.14, -0.0 )\ny = base.clamp( NaN, 0.0, 5.0 )\n",
6465
"base.cinv": "y = base.cinv( 2.0, 4.0 )\nout = new Float64Array( 2 );\nv = base.cinv( out, 2.0, 4.0 )\nbool = ( v === out )\n",
6566
"base.cmul": "out = base.cmul( 5.0, 3.0, -2.0, 1.0 )\n\n// Provide an output array:\nout = new Float64Array( 2 );\nv = base.cmul( out, 5.0, 3.0, -2.0, 1.0 )\nbool = ( v === out )\n",
6667
"base.continuedFraction": "\n// Continued fraction for (e-1)^(-1):\nfunction closure() {\ni = 0;\nreturn function() {\ni++;\nreturn [ i, i ];\n};\n}\ngen = closure()\nout = base.continuedFraction( gen )\n\n// Using an ES6 generator:\nfunction* generator() {\ni = 0;\nwhile ( true ) {\ni++;\nyield [ i, i ];\n}\n}\ngen = generator();\nout = base.continuedFraction( gen )\n\n// Set options:\nout = base.continuedFraction( generator(), { 'keep': true } )\nout = base.continuedFraction( generator(), { 'maxIter': 10 } )\nout = base.continuedFraction( generator(), { 'tolerance': 1e-1 } )\n",

lib/node_modules/@stdlib/repl/help/lib/db.js

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ module.exports = {
6161
"base.ceiln": "\nbase.ceiln( x, n )\n Rounds a numeric value to the nearest multiple of `10^n` toward positive\n infinity.\n\n When operating on floating-point numbers in bases other than `2`, rounding\n to specified digits can be inexact.\n\n Parameters\n ----------\n x: number\n Input value.\n\n n: integer\n Integer power of 10.\n\n Returns\n -------\n y: number\n Rounded value.\n\n Examples\n --------\n // Round to 2 decimal places:\n > var y = base.ceiln( 3.14159, -2 )\n 3.15\n\n // If `n = 0`, standard round toward positive infinity behavior:\n > y = base.ceiln( 3.14159, 0 )\n 4.0\n\n // Round to nearest thousand:\n > y = base.ceiln( 12368.0, 3 )\n 13000.0\n\n\n See Also\n --------\n base.ceil, base.ceilb, base.floorn, base.roundn\n",
6262
"base.ceilsd": "\nbase.ceilsd( x, n[, b] )\n Rounds a numeric value to the nearest number toward positive infinity with\n `n` significant figures.\n\n Parameters\n ----------\n x: number\n Input value.\n\n n: integer\n Number of significant figures. Must be greater than 0.\n\n b: integer (optional)\n Base. Must be greater than 0. Default: 10.\n\n Returns\n -------\n y: number\n Rounded value.\n\n Examples\n --------\n > var y = base.ceilsd( 3.14159, 5 )\n 3.1416\n > y = base.ceilsd( 3.14159, 1 )\n 4.0\n > y = base.ceilsd( 12368.0, 2 )\n 13000.0\n > y = base.ceilsd( 0.0313, 2, 2 )\n 0.046875\n\n See Also\n --------\n base.ceil, base.floorsd, base.roundsd, base.truncsd\n",
6363
"base.cfloor": "\nbase.cfloor( [out,] re, im )\n Rounds a complex number toward negative infinity.\n\n Parameters\n ----------\n out: Array|TypedArray|Object (optional)\n Output array.\n\n re: number\n Real component.\n\n im: number\n Imaginary component.\n\n Returns\n -------\n out: Array|TypedArray|Object\n Rounded components.\n\n Examples\n --------\n > var out = base.cfloor( 5.5, 3.3 )\n [ 5.0, 3.0 ]\n\n // Provide an output array:\n > out = new Float64Array( 2 );\n > var v = base.cfloor( out, 5.5, 3.3 )\n <Float64Array>[ 5.0, 3.0 ]\n > var bool = ( v === out )\n true\n\n See Also\n --------\n base.cceil, base.cround\n",
64+
"base.clamp": "\nbase.clamp( v, min, max )\n Restricts a value to a specified range.\n\n If provided `NaN` for any argument, the function returns `NaN`.\n\n Parameters\n ----------\n v: number\n Value to restrict.\n\n min: number\n Minimum value.\n\n max: number\n Maximum value.\n\n Returns\n -------\n y: number\n Restricted value.\n\n Examples\n --------\n > var y = base.clamp( 3.14, 0.0, 5.0 )\n 3.14\n > y = base.clamp( -3.14, 0.0, 5.0 )\n 0.0\n > y = base.clamp( 3.14, 0.0, 3.0 )\n 3.0\n > y = base.clamp( -0.0, 0.0, 5.0 )\n 0.0\n > y = base.clamp( 0.0, -3.14, -0.0 )\n -0.0\n > y = base.clamp( NaN, 0.0, 5.0 )\n NaN\n\n",
6465
"base.cinv": "\nbase.cinv( [out,] re, im )\n Computes the inverse of a complex number.\n\n Parameters\n ----------\n out: Array|TypedArray|Object (optional)\n Output array.\n\n re: number\n Real component.\n\n im: number\n Imaginary component.\n\n Returns\n -------\n out: Array|TypedArray|Object\n Real and imaginary components.\n\n Examples\n --------\n > var y = base.cinv( 2.0, 4.0 )\n [ 0.1, -0.2 ]\n\n > var out = new Float64Array( 2 );\n > var v = base.cinv( out, 2.0, 4.0 )\n <Float64Array>[ 0.1, -0.2 ]\n > var bool = ( v === out )\n true\n\n See Also\n --------\n base.cdiv\n",
6566
"base.cmul": "\nbase.cmul( [out,] re1, im1, re2, im2 )\n Multiplies two complex numbers.\n\n Parameters\n ----------\n out: Array|TypedArray|Object (optional)\n Output array.\n\n re1: number\n Real component.\n\n im1: number\n Imaginary component.\n\n re2: number\n Real component.\n\n im2: number\n Imaginary component.\n\n Returns\n -------\n out: Array|TypedArray|Object\n Array containing the real and imaginary components of the result.\n\n Examples\n --------\n > var out = base.cmul( 5.0, 3.0, -2.0, 1.0 )\n [ -13.0, -1.0 ]\n\n // Provide an output array:\n > var out = new Float64Array( 2 );\n > var v = base.cmul( out, 5.0, 3.0, -2.0, 1.0 )\n <Float64Array>[ -13.0, -1.0 ]\n > var bool = ( v === out )\n true\n\n See Also\n --------\n base.cadd, base.cdiv, base.csub\n",
6667
"base.continuedFraction": "\nbase.continuedFraction( generator[, options] )\n Evaluates the continued fraction approximation for the supplied series\n generator using the modified Lentz algorithm.\n\n `generator` can be either a function which returns an array with two\n elements, the `a` and `b` terms of the fraction, or an ES6 Generator object.\n\n By default, the function computes\n\n a1\n ---------------\n b1 + a2\n ----------\n b2 + a3\n -----\n b3 + ...\n\n To evaluate\n\n b0 +\t a1\n ---------------\n b1 +\t a2\n ----------\n b2 + a3\n -----\n b3 + ...\n\n set the `keep` option to `true`.\n\n Parameters\n ----------\n generator: Function\n Function returning terms of continued fraction expansion.\n\n options: Object (optional)\n Options.\n\n options.maxIter: integer (optional)\n Maximum number of iterations. Default: `1000000`.\n\n options.tolerance: number (optional)\n Further terms are only added as long as the next term is greater than\n current term times the tolerance. Default: `2.22e-16`.\n\n options.keep: boolean (optional)\n Boolean indicating whether to keep the `b0` term in the continued\n fraction. Default: `false`.\n\n Returns\n -------\n out: number\n Value of continued fraction.\n\n Examples\n --------\n // Continued fraction for (e-1)^(-1):\n > function closure() {\n > var i = 0;\n > return function() {\n > i++;\n > return [ i, i ];\n > };\n > }\n > var gen = closure()\n > var out = base.continuedFraction( gen )\n ~0.582\n\n // Using an ES6 generator:\n > function* generator() {\n > var i = 0;\n > while ( true ) {\n > i++;\n > yield [ i, i ];\n > }\n > }\n > gen = generator();\n > out = base.continuedFraction( gen )\n ~0.582\n\n // Set options:\n > out = base.continuedFraction( generator(), { 'keep': true } )\n ~1.718\n > out = base.continuedFraction( generator(), { 'maxIter': 10 } )\n ~0.582\n > out = base.continuedFraction( generator(), { 'tolerance': 1e-1 } )\n ~0.578\n\n",

0 commit comments

Comments
 (0)