From 8c2f3517e868078b551bb01d975f2956cb692fbf Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 27 Jan 2014 14:41:33 +0000 Subject: Various tinkerings. --- src/types.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/types.h') 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; -- cgit v1.2.3