Scratch

From WhyAskWhy.org Wiki
Revision as of 06:14, 3 August 2012 by Deoren (talk | contribs) (Test page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
class point2d {
public:
// constructor:
    explicit point2d(double xval=0, double yval=0);
// read access functions
    double x()const;
    double y()const;
    double modulus()const;
    double argument()const;
// write access functions
    point2d & x(double xval);
    point2d & y(double yval);
    point2d & modulus(double mod);
    point2d & argument(double degrees);
private:
    double x_;
    double y_;

};