mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
Fixed Bug in Equation For Intersection of Line and Plane
The equation to find the value of ’t' for the intersection of a line and a plane does not appear to be entirely correct. Please double-check.
This commit is contained in:
parent
e105f60ab7
commit
1313abe4ce
@ -125,7 +125,7 @@ function factory (type, config, load, typed) {
|
||||
}
|
||||
|
||||
function _intersectLinePlane(x1, y1, z1, x2, y2, z2, x, y, z, c){
|
||||
var t = (c - x1*x - y1*y - z1*z)/(x2*x + y2*y + z2*z - x1 - y1 - z1);
|
||||
var t = (c - x1*x - y1*y - z1*z)/(x2*x + y2*y + z2*z - x1*x - y1*y - z1*z);
|
||||
var px = x1 + t * (x2 - x1);
|
||||
var py = y1 + t * (y2 - y1);
|
||||
var pz = z1 + t * (z2 - z1);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user