diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2008-12-23 15:42:45 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2008-12-23 15:42:45 -0500 |
commit | c284b3d9011bcc51ca9bb5df5298756080ed5c2c (patch) | |
tree | 2958670fab64c9b5d970ef7e252194b2689420b2 /sigcore | |
parent | b0630958114b8e2057fb656c7dd7c7b98b76ce63 (diff) | |
download | sigen-c284b3d9011bcc51ca9bb5df5298756080ed5c2c.tar.gz sigen-c284b3d9011bcc51ca9bb5df5298756080ed5c2c.tar.xz sigen-c284b3d9011bcc51ca9bb5df5298756080ed5c2c.zip |
Added ctor for Range from value
Diffstat (limited to 'sigcore')
-rw-r--r-- | sigcore/Range.cpp | 5 | ||||
-rw-r--r-- | sigcore/Range.h | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sigcore/Range.cpp b/sigcore/Range.cpp index 4b57b986..90d0bc53 100644 --- a/sigcore/Range.cpp +++ b/sigcore/Range.cpp @@ -23,6 +23,11 @@ Sigcore::Range::Range() set(1, -1); } +Sigcore::Range::Range(const double value) +{ + set(value, value); +} + Sigcore::Range::Range(const double minimum, const double maximum) { set(minimum, maximum); diff --git a/sigcore/Range.h b/sigcore/Range.h index a2515845..7fd03602 100644 --- a/sigcore/Range.h +++ b/sigcore/Range.h @@ -40,6 +40,13 @@ class SIGCORE_EXPORT Range Range(); /** + * Conversion constructor. + * + * \param value Value to set the range to. + */ + Range(const double value); + + /** * Constructor. * * \param minimum The minimum value of the range. |