Numworks Epsilon  1.4.1
Graphing Calculator Operating System
two_parameter_law.cpp
Go to the documentation of this file.
1 #include "two_parameter_law.h"
2 #include <assert.h>
3 
4 namespace Probability {
5 
6 TwoParameterLaw::TwoParameterLaw(float parameterValue1, float parameterValue2) :
7  m_parameter1(parameterValue1),
8  m_parameter2(parameterValue2)
9 {
10 }
11 
13  return 2;
14 }
15 
17  assert(index >= 0 && index < 2);
18  if (index == 0) {
19  return m_parameter1;
20  }
21  return m_parameter2;
22 }
23 
24 void TwoParameterLaw::setParameterAtIndex(float f, int index) {
25  assert(index >= 0 && index < 2);
26  if (index == 0) {
27  m_parameter1 = f;
28  } else {
29  m_parameter2 = f;
30  }
31 }
32 
33 }
void setParameterAtIndex(float f, int index) override
#define assert(e)
Definition: assert.h:9
TwoParameterLaw(float parameterValue1, float parameterValue2)
float parameterValueAtIndex(int index) override