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
e1830dac
Commit
e1830dac
authored
Mar 01, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring cAVERAGEA.prototype.Calculate
parent
ea8df8bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
cell/model/FormulaObjects/statisticalFunctions.js
cell/model/FormulaObjects/statisticalFunctions.js
+10
-10
No files found.
cell/model/FormulaObjects/statisticalFunctions.js
View file @
e1830dac
...
@@ -488,47 +488,47 @@
...
@@ -488,47 +488,47 @@
var
count
=
0
,
sum
=
new
cNumber
(
0
);
var
count
=
0
,
sum
=
new
cNumber
(
0
);
for
(
var
i
=
0
;
i
<
arg
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
arg
.
length
;
i
++
)
{
var
_arg
=
arg
[
i
];
var
_arg
=
arg
[
i
];
if
(
_arg
instanceof
cRef
||
_arg
instanceof
cRef3D
)
{
if
(
cElementType
.
cell
===
_arg
.
type
||
cElementType
.
cell3D
===
_arg
.
type
)
{
var
_argV
=
_arg
.
getValue
();
var
_argV
=
_arg
.
getValue
();
if
(
_argV
instanceof
cNumber
||
_argV
instanceof
cBool
)
{
if
(
cElementType
.
number
===
_argV
.
type
||
cElementType
.
bool
===
_argV
.
type
)
{
sum
=
_func
[
sum
.
type
][
_argV
.
type
](
sum
,
_argV
,
"
+
"
);
sum
=
_func
[
sum
.
type
][
_argV
.
type
](
sum
,
_argV
,
"
+
"
);
count
++
;
count
++
;
}
else
if
(
_argV
instanceof
cString
)
{
}
else
if
(
cElementType
.
string
===
_argV
.
type
)
{
if
(
parseNum
(
_argV
.
getValue
()))
{
if
(
parseNum
(
_argV
.
getValue
()))
{
sum
=
_func
[
sum
.
type
][
_argV
.
type
](
sum
,
_argV
.
tocNumber
(),
"
+
"
);
sum
=
_func
[
sum
.
type
][
_argV
.
type
](
sum
,
_argV
.
tocNumber
(),
"
+
"
);
}
}
count
++
;
count
++
;
}
}
}
else
if
(
_arg
instanceof
cArea
||
_arg
instanceof
cArea3D
)
{
}
else
if
(
cElementType
.
cellsRange
===
_arg
.
type
||
cElementType
.
cellsRange3D
===
_arg
.
type
)
{
var
_argAreaValue
=
_arg
.
getValue
();
var
_argAreaValue
=
_arg
.
getValue
();
for
(
var
j
=
0
;
j
<
_argAreaValue
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
_argAreaValue
.
length
;
j
++
)
{
var
__arg
=
_argAreaValue
[
j
];
var
__arg
=
_argAreaValue
[
j
];
if
(
__arg
instanceof
cNumber
||
__arg
instanceof
cBool
)
{
if
(
cElementType
.
number
===
__arg
.
type
||
cElementType
.
bool
===
__arg
.
type
)
{
sum
=
_func
[
sum
.
type
][
__arg
.
type
](
sum
,
__arg
,
"
+
"
);
sum
=
_func
[
sum
.
type
][
__arg
.
type
](
sum
,
__arg
,
"
+
"
);
count
++
;
count
++
;
}
else
if
(
__arg
instanceof
cString
)
{
}
else
if
(
cElementType
.
string
===
__arg
.
type
)
{
if
(
parseNum
(
__arg
.
getValue
()))
{
if
(
parseNum
(
__arg
.
getValue
()))
{
sum
=
_func
[
sum
.
type
][
__arg
.
type
](
sum
,
__arg
.
tocNumber
(),
"
+
"
);
sum
=
_func
[
sum
.
type
][
__arg
.
type
](
sum
,
__arg
.
tocNumber
(),
"
+
"
);
}
}
count
++
;
count
++
;
}
}
}
}
}
else
if
(
_arg
instanceof
cArray
)
{
}
else
if
(
cElementType
.
array
===
_arg
.
type
)
{
_arg
.
foreach
(
function
(
elem
)
{
_arg
.
foreach
(
function
(
elem
)
{
if
(
elem
instanceof
cString
||
elem
instanceof
cEmpty
)
{
if
(
cElementType
.
string
===
elem
.
type
||
cElementType
.
empty
===
elem
.
type
)
{
return
false
;
return
false
;
}
}
var
e
=
elem
.
tocNumber
();
var
e
=
elem
.
tocNumber
();
if
(
e
instanceof
cNumber
)
{
if
(
cElementType
.
number
===
e
.
type
)
{
sum
=
_func
[
sum
.
type
][
e
.
type
](
sum
,
e
,
"
+
"
);
sum
=
_func
[
sum
.
type
][
e
.
type
](
sum
,
e
,
"
+
"
);
count
++
;
count
++
;
}
}
})
})
}
else
{
}
else
{
_arg
=
_arg
.
tocNumber
();
_arg
=
_arg
.
tocNumber
();
if
(
_arg
instanceof
cError
)
{
if
(
cElementType
.
error
===
_arg
.
type
)
{
return
this
.
value
=
_arg
;
return
this
.
value
=
_arg
;
}
}
sum
=
_func
[
sum
.
type
][
_arg
.
type
](
sum
,
_arg
,
"
+
"
);
sum
=
_func
[
sum
.
type
][
_arg
.
type
](
sum
,
_arg
,
"
+
"
);
...
...
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