Skip to content

Commit

Permalink
Fix CircularPrior logic
Browse files Browse the repository at this point in the history
  • Loading branch information
BenJarg committed Mar 6, 2025
1 parent d53668b commit f5e4e92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions covariance/covarianceOsc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ void covarianceOsc::proposeStep() {
void covarianceOsc::CircularPrior(const int index, const double LowBound, const double UpBound) {
// *************************************
if(_fPropVal[index] > UpBound) {
_fPropVal[index] = LowBound + std::fmod(_fPropVal[index], UpBound);
_fPropVal[index] = LowBound + std::fmod(_fPropVal[index] - UpBound, UpBound - LowBound);
} else if (_fPropVal[index] < LowBound) {
_fPropVal[index] = UpBound + std::fmod(_fPropVal[index], UpBound);
_fPropVal[index] = UpBound - std::fmod(LowBound - _fPropVal[index], UpBound - LowBound);
}
}

Expand Down

0 comments on commit f5e4e92

Please sign in to comment.