stevenhalim / cpbook-code

CP4 Free Source Code Project (C++17, Java11, Python3 and OCaml)
2.04k stars 491 forks source link

Fix pointsToLine #45

Closed donjar closed 5 years ago

donjar commented 5 years ago

In my computer, the original code seems to not work -- fixed it by abstracting a first.

stevenhalim commented 5 years ago

hm... I didn't find anything wrong with the original :O..., is it because of EPS setting? I reject this PR for now

stevenhalim commented 5 years ago

Ehhh sorry, another student also gave the same bug report

     1.0,              // IMPORTANT: we fix the value of b to 1.0
     -(double)(l.a*p1.x) - p1.y}; } // This l.a refers to the old value of l

I take the modification now