@vertexvis/geometry 0.12.0-canary.6 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -246,13 +246,14 @@ function makeTranslation(translation) {
246
246
  * Creates a rotation matrix.
247
247
  *
248
248
  * ```
249
- * 1-2y²-2z², 2xy+2zw, 2xz-2yw, 0,
250
- * 2xy-2zw, 1-2x²-2z², 2yz+2xw, 0,
251
- * 2xz+2yw, 2yz-2xw, 1-2x²-2y², 0,
249
+ * 1-2y²-2z², 2xy-2zw, 2xz+2yw, 0,
250
+ * 2xy+2zw, 1-2x²-2z², 2yz-2xw, 0,
251
+ * 2xz-2yw, 2yz+2xw, 1-2x²-2y², 0,
252
252
  * 0, 0, 0, 1,
253
253
  * ```
254
254
  *
255
255
  * @param rotation A quaternion representing the rotation.
256
+ * @see https://en.wikipedia.org/wiki/Rotation_matrix#Quaternion
256
257
  * @returns A rotation matrix.
257
258
  */
258
259
  function makeRotation(rotation) {
@@ -263,9 +264,9 @@ function makeRotation(rotation) {
263
264
  var wx = w * x2, wy = w * y2, wz = w * z2;
264
265
  /* eslint-disable prettier/prettier */
265
266
  return [
266
- 1 - (yy + zz), xy - wz, xz + wy, 0,
267
- xy + wz, 1 - (xx + zz), yz - wx, 0,
268
- xz - wy, yz + wx, 1 - (xx + yy), 0,
267
+ 1 - (yy + zz), xy + wz, xz - wy, 0,
268
+ xy - wz, 1 - (xx + zz), yz + wx, 0,
269
+ xz + wy, yz - wx, 1 - (xx + yy), 0,
269
270
  0, 0, 0, 1
270
271
  ];
271
272
  /* eslint-enable prettier/prettier */
@@ -1882,7 +1883,7 @@ function intersectLine(plane, line) {
1882
1883
  return undefined;
1883
1884
  }
1884
1885
  else {
1885
- return add(line.start, scale$2(t, direction$1));
1886
+ return add(scale$2(t, direction$1), line.start);
1886
1887
  }
1887
1888
  }
1888
1889
  /**