feat:node-modules
This commit is contained in:
56
node_modules/mathjs/lib/cjs/function/complex/arg.js
generated
vendored
Normal file
56
node_modules/mathjs/lib/cjs/function/complex/arg.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createArg = void 0;
|
||||
var _factory = require("../../utils/factory.js");
|
||||
var _collection = require("../../utils/collection.js");
|
||||
const name = 'arg';
|
||||
const dependencies = ['typed'];
|
||||
const createArg = exports.createArg = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
|
||||
let {
|
||||
typed
|
||||
} = _ref;
|
||||
/**
|
||||
* Compute the argument of a complex value.
|
||||
* For a complex number `a + bi`, the argument is computed as `atan2(b, a)`.
|
||||
*
|
||||
* For matrices, the function is evaluated element wise.
|
||||
*
|
||||
* Syntax:
|
||||
*
|
||||
* math.arg(x)
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* const a = math.complex(2, 2)
|
||||
* math.arg(a) / math.pi // returns number 0.25
|
||||
*
|
||||
* const b = math.complex('2 + 3i')
|
||||
* math.arg(b) // returns number 0.982793723247329
|
||||
* math.atan2(3, 2) // returns number 0.982793723247329
|
||||
*
|
||||
* See also:
|
||||
*
|
||||
* re, im, conj, abs
|
||||
*
|
||||
* @param {number | BigNumber | Complex | Array | Matrix} x
|
||||
* A complex number or array with complex numbers
|
||||
* @return {number | BigNumber | Array | Matrix} The argument of x
|
||||
*/
|
||||
return typed(name, {
|
||||
number: function (x) {
|
||||
return Math.atan2(0, x);
|
||||
},
|
||||
BigNumber: function (x) {
|
||||
return x.constructor.atan2(0, x);
|
||||
},
|
||||
Complex: function (x) {
|
||||
return x.arg();
|
||||
},
|
||||
// TODO: implement BigNumber support for function arg
|
||||
|
||||
'Array | Matrix': typed.referToSelf(self => x => (0, _collection.deepMap)(x, self))
|
||||
});
|
||||
});
|
||||
45
node_modules/mathjs/lib/cjs/function/complex/conj.js
generated
vendored
Normal file
45
node_modules/mathjs/lib/cjs/function/complex/conj.js
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createConj = void 0;
|
||||
var _factory = require("../../utils/factory.js");
|
||||
var _collection = require("../../utils/collection.js");
|
||||
const name = 'conj';
|
||||
const dependencies = ['typed'];
|
||||
const createConj = exports.createConj = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
|
||||
let {
|
||||
typed
|
||||
} = _ref;
|
||||
/**
|
||||
* Compute the complex conjugate of a complex value.
|
||||
* If `x = a+bi`, the complex conjugate of `x` is `a - bi`.
|
||||
*
|
||||
* For matrices, the function is evaluated element wise.
|
||||
*
|
||||
* Syntax:
|
||||
*
|
||||
* math.conj(x)
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* math.conj(math.complex('2 + 3i')) // returns Complex 2 - 3i
|
||||
* math.conj(math.complex('2 - 3i')) // returns Complex 2 + 3i
|
||||
* math.conj(math.complex('-5.2i')) // returns Complex 5.2i
|
||||
*
|
||||
* See also:
|
||||
*
|
||||
* re, im, arg, abs
|
||||
*
|
||||
* @param {number | BigNumber | Complex | Array | Matrix} x
|
||||
* A complex number or array with complex numbers
|
||||
* @return {number | BigNumber | Complex | Array | Matrix}
|
||||
* The complex conjugate of x
|
||||
*/
|
||||
return typed(name, {
|
||||
'number | BigNumber | Fraction': x => x,
|
||||
Complex: x => x.conjugate(),
|
||||
'Array | Matrix': typed.referToSelf(self => x => (0, _collection.deepMap)(x, self))
|
||||
});
|
||||
});
|
||||
48
node_modules/mathjs/lib/cjs/function/complex/im.js
generated
vendored
Normal file
48
node_modules/mathjs/lib/cjs/function/complex/im.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createIm = void 0;
|
||||
var _factory = require("../../utils/factory.js");
|
||||
var _collection = require("../../utils/collection.js");
|
||||
const name = 'im';
|
||||
const dependencies = ['typed'];
|
||||
const createIm = exports.createIm = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
|
||||
let {
|
||||
typed
|
||||
} = _ref;
|
||||
/**
|
||||
* Get the imaginary part of a complex number.
|
||||
* For a complex number `a + bi`, the function returns `b`.
|
||||
*
|
||||
* For matrices, the function is evaluated element wise.
|
||||
*
|
||||
* Syntax:
|
||||
*
|
||||
* math.im(x)
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* const a = math.complex(2, 3)
|
||||
* math.re(a) // returns number 2
|
||||
* math.im(a) // returns number 3
|
||||
*
|
||||
* math.re(math.complex('-5.2i')) // returns number -5.2
|
||||
* math.re(math.complex(2.4)) // returns number 0
|
||||
*
|
||||
* See also:
|
||||
*
|
||||
* re, conj, abs, arg
|
||||
*
|
||||
* @param {number | BigNumber | Complex | Array | Matrix} x
|
||||
* A complex number or array with complex numbers
|
||||
* @return {number | BigNumber | Array | Matrix} The imaginary part of x
|
||||
*/
|
||||
return typed(name, {
|
||||
number: () => 0,
|
||||
'BigNumber | Fraction': x => x.mul(0),
|
||||
Complex: x => x.im,
|
||||
'Array | Matrix': typed.referToSelf(self => x => (0, _collection.deepMap)(x, self))
|
||||
});
|
||||
});
|
||||
47
node_modules/mathjs/lib/cjs/function/complex/re.js
generated
vendored
Normal file
47
node_modules/mathjs/lib/cjs/function/complex/re.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.createRe = void 0;
|
||||
var _factory = require("../../utils/factory.js");
|
||||
var _collection = require("../../utils/collection.js");
|
||||
const name = 're';
|
||||
const dependencies = ['typed'];
|
||||
const createRe = exports.createRe = /* #__PURE__ */(0, _factory.factory)(name, dependencies, _ref => {
|
||||
let {
|
||||
typed
|
||||
} = _ref;
|
||||
/**
|
||||
* Get the real part of a complex number.
|
||||
* For a complex number `a + bi`, the function returns `a`.
|
||||
*
|
||||
* For matrices, the function is evaluated element wise.
|
||||
*
|
||||
* Syntax:
|
||||
*
|
||||
* math.re(x)
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* const a = math.complex(2, 3)
|
||||
* math.re(a) // returns number 2
|
||||
* math.im(a) // returns number 3
|
||||
*
|
||||
* math.re(math.complex('-5.2i')) // returns number 0
|
||||
* math.re(math.complex(2.4)) // returns number 2.4
|
||||
*
|
||||
* See also:
|
||||
*
|
||||
* im, conj, abs, arg
|
||||
*
|
||||
* @param {number | BigNumber | Complex | Array | Matrix} x
|
||||
* A complex number or array with complex numbers
|
||||
* @return {number | BigNumber | Array | Matrix} The real part of x
|
||||
*/
|
||||
return typed(name, {
|
||||
'number | BigNumber | Fraction': x => x,
|
||||
Complex: x => x.re,
|
||||
'Array | Matrix': typed.referToSelf(self => x => (0, _collection.deepMap)(x, self))
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user