Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Caillat Michel
yafits
Commits
72e0cf42
Commit
72e0cf42
authored
Jan 08, 2020
by
Moreau Nicolas
Browse files
correction for incorrect summed graph title calculation
parent
f2c414d8
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
yafitsv/public/javascript/olqv_utils.js
View file @
72e0cf42
...
...
@@ -238,3 +238,19 @@ function EXIT() {
}
console
.
log
(
result
+
"
: exiting
"
);
}
/**
Returns the index of the closest element in the array
for tyhe given value or null if not found
*/
function
getIndex
(
array
,
value
){
for
(
let
i
=
0
;
i
<
array
.
length
;
i
++
){
if
(
value
>=
array
[
i
]
&&
value
<
array
[
i
+
1
]){
if
(
Math
.
abs
(
array
[
i
+
1
]
-
value
)
>
Math
.
abs
(
array
[
i
]
-
value
))
return
i
;
else
return
i
+
1
;
}
}
return
null
;
}
\ No newline at end of file
yafitsv/views/olqv.ejs
View file @
72e0cf42
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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