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
06ecfc3d
Commit
06ecfc3d
authored
Jun 01, 2017
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add IMTAN formula
parent
d8ab4f64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
14 deletions
+62
-14
cell/model/FormulaObjects/_xlfnFunctions.js
cell/model/FormulaObjects/_xlfnFunctions.js
+1
-13
cell/model/FormulaObjects/engineeringFunctions.js
cell/model/FormulaObjects/engineeringFunctions.js
+61
-1
No files found.
cell/model/FormulaObjects/_xlfnFunctions.js
View file @
06ecfc3d
...
...
@@ -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
,
cIMCSC
,
cIMCSCH
,
cIMSEC
,
cIMSECH
,
cIMSINH
,
cIMTAN
);
cERFC_PRECISE
,
cIMCSC
,
cIMCSCH
,
cIMSEC
,
cIMSECH
,
cIMSINH
);
cFormulaFunctionGroup
[
'
TextAndData
'
]
=
cFormulaFunctionGroup
[
'
TextAndData
'
]
||
[];
cFormulaFunctionGroup
[
'
TextAndData
'
].
push
(
cDBCS
,
cNUMBERVALUE
,
cUNICHAR
,
cUNICODE
);
cFormulaFunctionGroup
[
'
Statistical
'
]
=
cFormulaFunctionGroup
[
'
Statistical
'
]
||
[];
...
...
@@ -676,18 +676,6 @@
cIMSINH
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cIMSINH
.
prototype
.
constructor
=
cIMSINH
;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cIMTAN
()
{
cBaseFunction
.
call
(
this
,
"
IMTAN
"
);
this
.
isXLFN
=
true
;
}
cIMTAN
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cIMTAN
.
prototype
.
constructor
=
cIMTAN
;
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
...
...
cell/model/FormulaObjects/engineeringFunctions.js
View file @
06ecfc3d
...
...
@@ -476,6 +476,14 @@
}
else
{
this
.
real
=
Math
.
cos
(
this
.
real
);
}
},
Tan
:
function
()
{
if
(
this
.
img
)
{
var
a
=
Math
.
sin
(
2
*
this
.
real
)
/
(
Math
.
cos
(
2
*
this
.
real
)
+
Math
.
cosh
(
2
*
this
.
img
));
this
.
img
=
Math
.
sinh
(
2
*
this
.
img
)
/
(
Math
.
cos
(
2
*
this
.
real
)
+
Math
.
cosh
(
2
*
this
.
img
));
this
.
real
=
a
;
}
else
{
this
.
real
=
Math
.
tan
(
this
.
real
);
}
},
Cot
:
function
()
{
if
(
this
.
img
)
{
var
a
=
Math
.
sin
(
2
*
this
.
real
)
/
(
Math
.
cosh
(
2
*
this
.
img
)
-
Math
.
cos
(
2
*
this
.
real
));
...
...
@@ -890,7 +898,7 @@
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
,
cIMCOT
,
cIMDIV
,
cIMEXP
,
cIMLN
,
cIMLOG10
,
cIMLOG2
,
cIMPOWER
,
cIMPRODUCT
,
cIMREAL
,
cIMSIN
,
cIMSQRT
,
cIMSUB
,
cIMSUM
,
cOCT2BIN
,
cOCT2DEC
,
cOCT2HEX
);
cIMPRODUCT
,
cIMREAL
,
cIMSIN
,
cIMSQRT
,
cIMSUB
,
cIMSUM
,
c
IMTAN
,
c
OCT2BIN
,
cOCT2DEC
,
cOCT2HEX
);
/**
* @constructor
...
...
@@ -2901,6 +2909,58 @@
};
};
/**
* @constructor
* @extends {AscCommonExcel.cBaseFunction}
*/
function
cIMTAN
()
{
cBaseFunction
.
call
(
this
,
"
IMTAN
"
);
}
//TODO проверить!!!
cIMTAN
.
prototype
=
Object
.
create
(
cBaseFunction
.
prototype
);
cIMTAN
.
prototype
.
constructor
=
cIMTAN
;
cIMTAN
.
prototype
.
argumentsMin
=
1
;
cIMTAN
.
prototype
.
argumentsMax
=
1
;
cIMTAN
.
prototype
.
isXLFN
=
true
;
cIMTAN
.
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
);
}
arg0
=
arg0
.
tocString
();
if
(
arg0
instanceof
cError
)
{
return
this
.
value
=
arg0
;
}
if
(
arg0
.
value
===
true
||
arg0
.
value
===
false
){
return
this
.
value
=
new
cError
(
cErrorType
.
wrong_value_type
);
}
var
c
=
new
Complex
(
arg0
.
toString
());
if
(
c
instanceof
cError
)
{
return
this
.
value
=
c
;
}
c
.
Tan
();
this
.
value
=
new
cString
(
c
.
toString
());
this
.
value
.
numFormat
=
0
;
return
this
.
value
;
};
cIMTAN
.
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