Biorbd
Range.cpp
1 #define BIORBD_API_EXPORTS
2 #include "Utils/Range.h"
3 
5  double min,
6  double max) :
7  m_min(std::make_shared<double>(min)),
8  m_max(std::make_shared<double>(max))
9 {
10 
11 }
12 
15 {
17  copy.DeepCopy(*this);
18  return copy;
19 }
20 
22  const biorbd::utils::Range &other)
23 {
24  *m_min = *other.m_min;
25  *m_max = *other.m_max;
26 }
27 
29  double min)
30 {
31  *m_min = min;
32 }
33 
35 {
36  return *m_min;
37 }
38 
40  double max)
41 {
42  *m_max = max;
43 }
44 
46 {
47  return *m_max;
48 }
biorbd::utils::Range::m_max
std::shared_ptr< double > m_max
The maximal value allowed by the range.
Definition: Range.h:63
biorbd::utils::Range::Range
Range(double min=-M_PI, double max=M_PI)
Construct generalized coordinates range.
Definition: Range.cpp:4
biorbd::utils::Range
Class Range.
Definition: Range.h:15
biorbd::utils::Range::min
double min() const
Return the minimum value.
Definition: Range.cpp:34
biorbd::utils::Range::max
double max() const
Return the maximum value.
Definition: Range.cpp:45
biorbd::utils::Range::setMax
void setMax(double max)
Set a new value for the maximal.
Definition: Range.cpp:39
biorbd::utils::Range::setMin
void setMin(double min)
Set a new value for the minimum.
Definition: Range.cpp:28
biorbd::utils::Range::DeepCopy
biorbd::utils::Range DeepCopy() const
Deep copy of the Range.
Definition: Range.cpp:14
biorbd::utils::Range::m_min
std::shared_ptr< double > m_min
The minimal value allowed by the range.
Definition: Range.h:62