@vertexvis/geometry 1.0.2-canary.12 → 1.0.2-canary.13

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.
package/dist/bundle.cjs CHANGED
@@ -1195,6 +1195,14 @@ function isValid$1(_a) {
1195
1195
  var x = _a.x, y = _a.y, z = _a.z;
1196
1196
  return [x, y, z].every(function (v) { return isFinite(v) && !isNaN(v); });
1197
1197
  }
1198
+ /**
1199
+ * Checks if every component of the given vector is zero.
1200
+ * Useful for detecting potentially problematic camera vectors, for example.
1201
+ */
1202
+ function isZeroVector(_a) {
1203
+ var x = _a.x, y = _a.y, z = _a.z;
1204
+ return [x, y, z].every(function (v) { return v === 0; });
1205
+ }
1198
1206
  /**
1199
1207
  * Returns a vector representing the scale elements of `matrix`.
1200
1208
  */
@@ -1583,6 +1591,7 @@ var vector3 = /*#__PURE__*/Object.freeze({
1583
1591
  fromMatrixScale: fromMatrixScale,
1584
1592
  isEqual: isEqual$2,
1585
1593
  isValid: isValid$1,
1594
+ isZeroVector: isZeroVector,
1586
1595
  left: left,
1587
1596
  lerp: lerp,
1588
1597
  magnitude: magnitude,