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
d8ab4f64
Commit
d8ab4f64
authored
Jun 01, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add IMCOT formula
parent
113736e2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
14 deletions
+65
-14
cell/model/FormulaObjects/_xlfnFunctions.js
cell/model/FormulaObjects/_xlfnFunctions.js
+1
-13
cell/model/FormulaObjects/engineeringFunctions.js
cell/model/FormulaObjects/engineeringFunctions.js
+64
-1
No files found.
cell/model/FormulaObjects/_xlfnFunctions.js
View file @
d8ab4f64
...
...
@@ -52,7 +52,7 @@
cFormulaFunctionGroup
[
'
DateAndTime
'
].
push
(
cDAYS
,
cISOWEEKNUM
);
cFormulaFunctionGroup
[
'
Engineering
'
]
=
cFormulaFunctionGroup
[
'
Engineering
'
]
||
[];
cFormulaFunctionGroup
[
'
Engineering
'
].
push
(
cBITAND
,
cBITLSHIFT
,
cBITOR
,
cBITRSHIFT
,
cBITXOR
,
cERF_PRECISE
,
cERFC_PRECISE
,
cIMC
OT
,
cIMC
SC
,
cIMCSCH
,
cIMSEC
,
cIMSECH
,
cIMSINH
,
cIMTAN
);
cERFC_PRECISE
,
cIMCSC
,
cIMCSCH
,
cIMSEC
,
cIMSECH
,
cIMSINH
,
cIMTAN
);
cFormulaFunctionGroup
[
'
TextAndData
'
]
=
cFormulaFunctionGroup
[
'
TextAndData
'
]
||
[];
cFormulaFunctionGroup
[
'
TextAndData
'
].
push
(
cDBCS
,
cNUMBERVALUE
,
cUNICHAR
,
cUNICODE
);
cFormulaFunctionGroup
[
'
Statistical
'
]
=
cFormulaFunctionGroup
[
'
Statistical
'
]
||
[];
...
...
@@ -616,18 +616,6 @@
cIFNA
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cIFNA
.
prototype
.
constructor
=
cIFNA
;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cIMCOT
()
{
cBaseFunction
.
call
(
this
,
"
IMCOT
"
);
this
.
isXLFN
=
true
;
}
cIMCOT
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cIMCOT
.
prototype
.
constructor
=
cIMCOT
;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
...
...
cell/model/FormulaObjects/engineeringFunctions.js
View file @
d8ab4f64
...
...
@@ -476,6 +476,14 @@
}
else
{
this
.
real
=
Math
.
cos
(
this
.
real
);
}
},
Cot
:
function
()
{
if
(
this
.
img
)
{
var
a
=
Math
.
sin
(
2
*
this
.
real
)
/
(
Math
.
cosh
(
2
*
this
.
img
)
-
Math
.
cos
(
2
*
this
.
real
));
this
.
img
=
-
(
Math
.
sinh
(
2
*
this
.
img
)
/
(
Math
.
cosh
(
2
*
this
.
img
)
-
Math
.
cos
(
2
*
this
.
real
)));
this
.
real
=
a
;
}
else
{
this
.
real
=
1
/
Math
.
tan
(
this
.
real
);
}
},
Cosh
:
function
()
{
if
(
this
.
img
)
{
var
a
=
Math
.
cosh
(
this
.
real
)
*
Math
.
cos
(
this
.
img
);
...
...
@@ -881,7 +889,7 @@
cFormulaFunctionGroup
[
'
Engineering
'
]
=
cFormulaFunctionGroup
[
'
Engineering
'
]
||
[];
cFormulaFunctionGroup
[
'
Engineering
'
].
push
(
cBESSELI
,
cBESSELJ
,
cBESSELK
,
cBESSELY
,
cBIN2DEC
,
cBIN2HEX
,
cBIN2OCT
,
cCOMPLEX
,
cCONVERT
,
cDEC2BIN
,
cDEC2HEX
,
cDEC2OCT
,
cDELTA
,
cERF
,
cERFC
,
cGESTEP
,
cHEX2BIN
,
cHEX2DEC
,
cHEX2OCT
,
cIMABS
,
cIMAGINARY
,
cIMARGUMENT
,
cIMCONJUGATE
,
cIMCOS
,
cIMCOSH
,
cIMDIV
,
cIMEXP
,
cIMLN
,
cIMLOG10
,
cIMLOG2
,
cIMPOWER
,
cIMABS
,
cIMAGINARY
,
cIMARGUMENT
,
cIMCONJUGATE
,
cIMCOS
,
cIMCOSH
,
cIM
COT
,
cIM
DIV
,
cIMEXP
,
cIMLN
,
cIMLOG10
,
cIMLOG2
,
cIMPOWER
,
cIMPRODUCT
,
cIMREAL
,
cIMSIN
,
cIMSQRT
,
cIMSUB
,
cIMSUM
,
cOCT2BIN
,
cOCT2DEC
,
cOCT2HEX
);
/**
...
...
@@ -2117,6 +2125,61 @@
};
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cIMCOT
()
{
cBaseFunction
.
call
(
this
,
"
IMCOT
"
);
}
cIMCOT
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cIMCOT
.
prototype
.
constructor
=
cIMCOT
;
cIMCOT
.
prototype
.
argumentsMin
=
1
;
cIMCOT
.
prototype
.
argumentsMax
=
1
;
cIMCOT
.
prototype
.
isXLFN
=
true
;
cIMCOT
.
prototype
.
Calculate
=
function
(
arg
)
{
var
arg0
=
arg
[
0
];
if
(
arg0
instanceof
cArea
||
arg0
instanceof
cArea3D
)
{
arg0
=
arg0
.
cross
(
arguments
[
1
]);
}
else
if
(
arg0
instanceof
cArray
)
{
arg0
=
arg0
.
getElementRowCol
(
0
,
0
);
}
if
(
arg0
.
value
===
true
||
arg0
.
value
===
false
){
return
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
arg0
=
arg0
.
tocString
();
if
(
arg0
instanceof
cError
)
{
return
this
.
value
=
arg0
;
}
if
(
0
==
arg0
.
value
){
return
this
.
value
=
new
cError
(
cErrorType
.
not_numeric
);
}
var
c
=
new
Complex
(
arg0
.
toString
());
if
(
c
instanceof
cError
)
{
return
this
.
value
=
c
;
}
c
.
Cot
();
this
.
value
=
new
cString
(
c
.
toString
());
this
.
value
.
numFormat
=
0
;
return
this
.
value
;
};
cIMCOT
.
prototype
.
getInfo
=
function
()
{
return
{
name
:
this
.
name
,
args
:
"
( complex-number )
"
};
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
...
...
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