fix calculation of distance from plane to origin

fix calculation of distance from plane to origin
Merge pull request #1592 from sxop/master

fix calculation of distance from plane to origin
Merge pull request #1 from blackberry/master

merge from major github repository