ezag / pyeuclid

2D and 3D maths module for Python
97 stars 41 forks source link

Fix determination of Plane scaler #13

Open franzlst opened 7 years ago

franzlst commented 7 years ago

The equation to determine the scalar for a plane from the normal and a point missed a minus, see for example https://en.wikipedia.org/wiki/Plane_%28geometry%29#Point-normal_form_and_general_form_of_the_equation_of_a_plane

codecov-io commented 7 years ago

Current coverage is 54.67% (diff: 0.00%)

Merging #13 into master will not change coverage

@@             master        #13   diff @@
==========================================
  Files             1          1          
  Lines          1635       1635          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits            894        894          
  Misses          741        741          
  Partials          0          0          

Powered by Codecov. Last update 0a2760a...150e930

franzlst commented 7 years ago

I'm nor sure whether the k in the Plane refers to the scalar part of the point-normal form of a plane or whether it's multiplied by -1 intentionally.

If it refers to the scalar part, this has more consequences to the code. At least all references to k in the _get_point method of Plane must also be negated.