I have class Line, which represent 2 dimensional line. It has function for checking if 2d point lie on this line.
class Line
{
private:
float a,b,c: //line coefficients
public:
bool checkPointOnLine();
.....
}
now I have to check find point of intersectionof 2 lines. I'm wondering if it is better to put new member function in class Line like
class Line
{
private:
float a,b,c: //line coefficients
public:
bool checkPointOnLine();
Point getIntersectionPoint(const Line& line);
.....
}
or to use non member function
Point getIntersectionPoint(const Line& l1,const Line& l2);