Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
5f901ed0
Commit
5f901ed0
authored
Jul 31, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add BESSELJ formula
parent
89ab2b0e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletion
+46
-1
cell/model/FormulaObjects/engineeringFunctions.js
cell/model/FormulaObjects/engineeringFunctions.js
+46
-1
No files found.
cell/model/FormulaObjects/engineeringFunctions.js
View file @
5f901ed0
...
...
@@ -943,7 +943,7 @@
cOCT2DEC
,
cOCT2HEX
);
cFormulaFunctionGroup
[
'
NotRealised
'
]
=
cFormulaFunctionGroup
[
'
NotRealised
'
]
||
[];
cFormulaFunctionGroup
[
'
NotRealised
'
].
push
(
cBESSELI
,
cBESSEL
J
,
cBESSEL
K
,
cBESSELY
,
cCONVERT
);
cFormulaFunctionGroup
[
'
NotRealised
'
].
push
(
cBESSELI
,
cBESSELK
,
cBESSELY
,
cCONVERT
);
/**
* @constructor
...
...
@@ -1010,6 +1010,51 @@
cBESSELJ
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cBESSELJ
.
prototype
.
constructor
=
cBESSELJ
;
cBESSELJ
.
prototype
.
argumentsMin
=
2
;
cBESSELJ
.
prototype
.
argumentsMax
=
2
;
cBESSELJ
.
prototype
.
Calculate
=
function
(
arg
)
{
var
x
=
arg
[
0
],
n
=
arg
[
1
];
if
(
x
instanceof
cArea
||
x
instanceof
cArea3D
)
{
x
=
x
.
cross
(
arguments
[
1
]
);
}
else
if
(
x
instanceof
cArray
)
{
x
=
x
.
getElementRowCol
(
0
,
0
);
}
if
(
n
instanceof
cArea
||
n
instanceof
cArea3D
)
{
n
=
n
.
cross
(
arguments
[
1
]
);
}
else
if
(
n
instanceof
cArray
)
{
n
=
n
.
getElementRowCol
(
0
,
0
);
}
x
=
x
.
tocNumber
();
n
=
n
.
tocNumber
();
if
(
x
instanceof
cError
)
{
return
this
.
value
=
x
;
}
if
(
n
instanceof
cError
)
{
return
this
.
value
=
n
;
}
x
=
x
.
getValue
();
n
=
n
.
getValue
();
if
(
n
<
0
){
return
this
.
value
=
new
cError
(
cErrorType
.
not_numeric
);
}
if
(
x
<
0
){
x
=
Math
.
abs
(
x
);
}
n
=
Math
.
floor
(
n
);
this
.
value
=
BesselJ
(
x
,
n
);
return
this
.
value
;
};
/**
* @constructor
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment