Files
Upsilon/apps/probability/distribution/two_parameter_distribution.cpp
Arthur Camouseigt 018dd91ca1 [Probability] Changed distribution parameter's type to double
Plots are still rendered in float but computations are now in double

Change-Id: I7e0a38effb780861b1443ee92a097cd319de3bc8
2020-11-04 14:45:35 +01:00

24 lines
456 B
C++

#include "two_parameter_distribution.h"
#include <assert.h>
namespace Probability {
double TwoParameterDistribution::parameterValueAtIndex(int index) {
assert(index >= 0 && index < 2);
if (index == 0) {
return m_parameter1;
}
return m_parameter2;
}
void TwoParameterDistribution::setParameterAtIndex(float f, int index) {
assert(index >= 0 && index < 2);
if (index == 0) {
m_parameter1 = f;
} else {
m_parameter2 = f;
}
}
}