Skip to content
Discussion options

You must be logged in to vote

Hi @GaglianoLuca, you're right that these two lines of the code can be simplified. We could update it to:

if (p0_helper > p0_min) {
dp0_depv = dp0_depv_helper - 0.5 * p0_min;
} else {
dp0_depv = 0.5 * p0_min;
}

Thanks for catching this. As @larsblatny mentioned, this section was likely to help ensure dp0_depv is updating correctly, but I just directly translated what I had written on paper to code without taking a second look to simplify it at the time.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by GaglianoLuca
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants