summaryrefslogtreecommitdiffstats
path: root/o3d/samples/o3djs/manipulators.js
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/samples/o3djs/manipulators.js')
-rw-r--r--o3d/samples/o3djs/manipulators.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/o3d/samples/o3djs/manipulators.js b/o3d/samples/o3djs/manipulators.js
index 8dc7278..4aa300f 100644
--- a/o3d/samples/o3djs/manipulators.js
+++ b/o3d/samples/o3djs/manipulators.js
@@ -244,8 +244,10 @@ o3djs.manipulators.Line_.prototype.closestPointToRay = function(startPoint,
// value of u' is less than zero.
var rayDirection = o3djs.math.subVector(endPoint, startPoint);
var ddrd = o3djs.math.dot(this.direction_, rayDirection);
- var A = [[-o3djs.math.lengthSquared(this.direction_), ddrd],
- [ddrd, -o3djs.math.lengthSquared(rayDirection)]];
+ var A = o3djs.math.makeMatrix2(-o3djs.math.lengthSquared(this.direction_),
+ ddrd,
+ ddrd,
+ -o3djs.math.lengthSquared(rayDirection));
var det = o3djs.math.det2(A);
if (Math.abs(det) < o3djs.manipulators.EPSILON) {
return null;