1 | import { factory } from '../../utils/factory.js';
|
2 | import { createAlgorithm02 } from '../../type/matrix/utils/algorithm02.js';
|
3 | import { createAlgorithm03 } from '../../type/matrix/utils/algorithm03.js';
|
4 | import { createAlgorithm09 } from '../../type/matrix/utils/algorithm09.js';
|
5 | import { createAlgorithm11 } from '../../type/matrix/utils/algorithm11.js';
|
6 | import { createAlgorithm12 } from '../../type/matrix/utils/algorithm12.js';
|
7 | import { createAlgorithm13 } from '../../type/matrix/utils/algorithm13.js';
|
8 | import { createAlgorithm14 } from '../../type/matrix/utils/algorithm14.js';
|
9 | var name = 'atan2';
|
10 | var dependencies = ['typed', 'matrix', 'equalScalar', 'BigNumber', 'DenseMatrix'];
|
11 | export var createAtan2 = factory(name, dependencies, (_ref) => {
|
12 | var {
|
13 | typed,
|
14 | matrix,
|
15 | equalScalar,
|
16 | BigNumber,
|
17 | DenseMatrix
|
18 | } = _ref;
|
19 | var algorithm02 = createAlgorithm02({
|
20 | typed,
|
21 | equalScalar
|
22 | });
|
23 | var algorithm03 = createAlgorithm03({
|
24 | typed
|
25 | });
|
26 | var algorithm09 = createAlgorithm09({
|
27 | typed,
|
28 | equalScalar
|
29 | });
|
30 | var algorithm11 = createAlgorithm11({
|
31 | typed,
|
32 | equalScalar
|
33 | });
|
34 | var algorithm12 = createAlgorithm12({
|
35 | typed,
|
36 | DenseMatrix
|
37 | });
|
38 | var algorithm13 = createAlgorithm13({
|
39 | typed
|
40 | });
|
41 | var algorithm14 = createAlgorithm14({
|
42 | typed
|
43 | });
|
44 | |
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 | return typed(name, {
|
75 | 'number, number': Math.atan2,
|
76 |
|
77 |
|
78 |
|
79 | 'BigNumber, BigNumber': function BigNumberBigNumber(y, x) {
|
80 | return BigNumber.atan2(y, x);
|
81 | },
|
82 | 'SparseMatrix, SparseMatrix': function SparseMatrixSparseMatrix(x, y) {
|
83 | return algorithm09(x, y, this, false);
|
84 | },
|
85 | 'SparseMatrix, DenseMatrix': function SparseMatrixDenseMatrix(x, y) {
|
86 |
|
87 | return algorithm02(y, x, this, true);
|
88 | },
|
89 | 'DenseMatrix, SparseMatrix': function DenseMatrixSparseMatrix(x, y) {
|
90 | return algorithm03(x, y, this, false);
|
91 | },
|
92 | 'DenseMatrix, DenseMatrix': function DenseMatrixDenseMatrix(x, y) {
|
93 | return algorithm13(x, y, this);
|
94 | },
|
95 | 'Array, Array': function ArrayArray(x, y) {
|
96 | return this(matrix(x), matrix(y)).valueOf();
|
97 | },
|
98 | 'Array, Matrix': function ArrayMatrix(x, y) {
|
99 | return this(matrix(x), y);
|
100 | },
|
101 | 'Matrix, Array': function MatrixArray(x, y) {
|
102 | return this(x, matrix(y));
|
103 | },
|
104 | 'SparseMatrix, number | BigNumber': function SparseMatrixNumberBigNumber(x, y) {
|
105 | return algorithm11(x, y, this, false);
|
106 | },
|
107 | 'DenseMatrix, number | BigNumber': function DenseMatrixNumberBigNumber(x, y) {
|
108 | return algorithm14(x, y, this, false);
|
109 | },
|
110 | 'number | BigNumber, SparseMatrix': function numberBigNumberSparseMatrix(x, y) {
|
111 |
|
112 | return algorithm12(y, x, this, true);
|
113 | },
|
114 | 'number | BigNumber, DenseMatrix': function numberBigNumberDenseMatrix(x, y) {
|
115 |
|
116 | return algorithm14(y, x, this, true);
|
117 | },
|
118 | 'Array, number | BigNumber': function ArrayNumberBigNumber(x, y) {
|
119 | return algorithm14(matrix(x), y, this, false).valueOf();
|
120 | },
|
121 | 'number | BigNumber, Array': function numberBigNumberArray(x, y) {
|
122 | return algorithm14(matrix(y), x, this, true).valueOf();
|
123 | }
|
124 | });
|
125 | }); |
\ | No newline at end of file |