nr-point.h revision 6b15695578f07a3f72c4c9475c1a261a3021472a
#ifndef SEEN_NR_POINT_H
#define SEEN_NR_POINT_H
/** \file
* Cartesian point class.
*/
//#include <math.h>
//#include <stdexcept>
#include <iostream>
//#include <iomanip>
#include <libnr/nr-coord.h>
//#include "round.h"
#include "decimal-round.h"
/// A NRPoint consists of x and y coodinates.
/// \todo
/// This class appears to be obsoleted out in favour of NR::Point.
struct NRPoint {
};
/// Cartesian point.
inline Point()
_pt[X] = x;
_pt[Y] = y;
}
_pt[X] = p.x;
_pt[Y] = p.y;
}
for (unsigned i = 0; i < 2; ++i) {
}
}
for (unsigned i = 0; i < 2; ++i) {
}
return *this;
}
return _pt[i];
}
return _pt[i];
}
/** Return a point like this point but rotated -90 degrees.
(If the y axis grows downwards and the x axis grows to the
right, then this is 90 degrees counter-clockwise.)
**/
}
/** Return a point like this point but rotated +90 degrees.
(If the y axis grows downwards and the x axis grows to the
right, then this is 90 degrees clockwise.)
**/
}
/**
\brief A function to lower the precision of the point
\param places The number of decimal places that should be in
the final number.
*/
return;
}
void normalize();
for ( unsigned i = 0 ; i < 2 ; ++i ) {
}
return *this;
}
for ( unsigned i = 0 ; i < 2 ; ++i ) {
}
return *this;
}
for ( unsigned i = 0 ; i < 2 ; ++i ) {
_pt[i] /= s;
}
return *this;
}
for ( unsigned i = 0 ; i < 2 ; ++i ) {
_pt[i] *= s;
}
return *this;
}
}
};
/** A function to print out the Point. It just prints out the coords
on the given output stream */
return out_file;
}
} /* namespace NR */
#endif /* !SEEN_NR_POINT_H */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :