MeshKit  1.0
Point2D.cpp
Go to the documentation of this file.
00001 #include "meshkit/Point2D.hpp"
00002 
00003 Point2D::Point2D() : x(0), y(0)
00004 {
00005   // the initializers of x and y are all that is needed
00006 }
00007 
00008 Point2D::Point2D(double xVal, double yVal) : x(xVal), y(yVal)
00009 {
00010   // the initializers of x and y are all that is needed
00011 }
00012 
00013 double Point2D::getX() const
00014 {
00015   return x;
00016 }
00017 
00018 double Point2D::getY() const
00019 {
00020   return y;
00021 }
00022 
00023 bool operator==(const Point2D & onePnt, const Point2D & otherPnt)
00024 {
00025   return onePnt.getX() == otherPnt.getX() &&
00026       onePnt.getY() == otherPnt.getY();
00027 }
00028 
00029 bool operator!=(const Point2D & onePnt, const Point2D & otherPnt)
00030 {
00031   return onePnt.getX() != otherPnt.getX() ||
00032       onePnt.getY() != otherPnt.getY();
00033 }
00034 
00035 std::ostream& operator<<(std::ostream& outStream, const Point2D & point)
00036 {
00037   outStream << "(" << point.getX() << ", " << point.getY() << ")";
00038   return outStream;
00039 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines