" the class above, gets 2 points of geometry and draws a straight line".
The class you've posted does no drawing whatsoever. And despite its name also does not appear to restrict itself to storing only two points. The constructor certainly does not appear to restrict the numbers of points stored. It looks like the only function that sort of assumes two points is the debugging function print (it prints only two points, the first and the last) but it also looks like getGeoPoint assumes 3 points.
In fact, it looks like the methods implemented in the class actually belong to the base class. Are they just a copy of the functions in MgGeoLine? To me it looks like somebody either didn't understand inheritance or completely misnamed their classes.
It's near impossible to answer your question in any case as we don't know anything about the base class from which MgGeoLine2Point derives. It certainly does not restrict itself to storing points, since there's also something about a norm function and something about creating a grid.
Best Answer