I don't consider myself an expert but here is my take. I think it should be best if the function is static to the class. I'm not sure if this is possible or a good practice in C++ as I have coded only a little bit and some time ago in the language but it is certainly possible in C#. So you would have Point.Distance(p1,p2);
1
28 Jun 2015 15:05
u/Rhaelle
in v/programming
I don't consider myself an expert but here is my take. I think it should be best if the function is static to the class. I'm not sure if this is possible or a good practice in C++ as I have coded only a little bit and some time ago in the language but it is certainly possible in C#. So you would have Point.Distance(p1,p2);