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