summaryrefslogtreecommitdiff
path: root/src/types.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-27 14:41:33 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-27 14:41:33 +0000
commit8c2f3517e868078b551bb01d975f2956cb692fbf (patch)
tree81bf98f00b9a267a73494c1939c6e9473559c85e /src/types.h
parente5d368553b47a566a83d4edce0a8f166db9509e6 (diff)
Various tinkerings.
Diffstat (limited to 'src/types.h')
-rw-r--r--src/types.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/types.h b/src/types.h
index 1397dfdc..d34a9039 100644
--- a/src/types.h
+++ b/src/types.h
@@ -85,12 +85,20 @@ enum Eye
EYE_LEFT,
EYE_RIGHT
};
-
+
+/** @class Fraction
+ * @brief A fraction (i.e. a thing with an integer numerator and an integer denominator).
+ */
class Fraction
{
public:
+ /** Construct a fraction of 0/0 */
Fraction () : numerator (0), denominator (0) {}
Fraction (std::string s);
+ /** Construct a fraction with a specified numerator and denominator.
+ * @param n Numerator.
+ * @param d Denominator.
+ */
Fraction (int n, int d) : numerator (n), denominator (d) {}
int numerator;