Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gauthier Quesnel
irritator
Commits
b8ec7895
Commit
b8ec7895
authored
Jun 23, 2020
by
K-H-Ismail
Committed by
Gauthier Quesnel
Jul 02, 2020
Browse files
core: repair cross and reset in integrator
parent
2ae164de
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/include/irritator/core.hpp
View file @
b8ec7895
...
...
@@ -3299,7 +3299,18 @@ struct integrator
val
+=
(
t
-
archive
.
back
().
date
)
*
archive
.
back
().
x_dot
;
return
(
up_threshold
<
val
)
?
reset_value
:
val
;
if
(
up_threshold
<
val
)
{
return
reset_value
;
}
else
if
(
down_threshold
>
val
)
{
return
down_threshold
;
}
else
{
return
val
;
}
}
double
compute_expected_value
()
const
noexcept
...
...
@@ -4697,12 +4708,11 @@ struct cross
}
if
(
have_message_value
)
{
event
=
0.0
;
if
(
value
>=
threshold
)
{
else_value
=
if_value
;
event
=
1.0
;
}
else
{
event
=
0.0
;
}
}
}
result
=
else_value
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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