Added IllegalArgumentException for creating line from equal points.