added some math methods for point, line and line segment