harsha2010 / magellan

Geo Spatial Data Analytics on Spark
Apache License 2.0
533 stars 149 forks source link

Slope for lines that are parallel to the Y axis #172

Closed Charmatzis closed 7 years ago

Charmatzis commented 7 years ago

https://github.com/harsha2010/magellan/blob/134bd156b1fba5999cfba89461533442028ffe9d/src/main/scala/magellan/geometry/R2Loop.scala#L82

Since you divine with the x difference of the two points, if that is 0 , we have problem.....

harsha2010 commented 7 years ago

actually that's not true... if the point.x is outside the start.x/end.x then cond1 and cond2 will be false... Would be good to check by writing a unit test

harsha2010 commented 7 years ago

@Charmatzis look at #173 , it exhibits tests for these scenarios and shows it works just fine