Browse Source

added Vec3.setNaN

Alexander Rose 6 years ago
parent
commit
02402c9c9f
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/mol-math/linear-algebra/3d/vec3.ts

+ 7 - 0
src/mol-math/linear-algebra/3d/vec3.ts

@@ -47,6 +47,13 @@ namespace Vec3 {
         return isNaN(a[0]) || isNaN(a[1]) || isNaN(a[2])
     }
 
+    export function setNaN(out: Vec3) {
+        out[0] = NaN;
+        out[1] = NaN;
+        out[2] = NaN;
+        return out
+    }
+
     export function fromObj(v: { x: number, y: number, z: number }): Vec3 {
         return create(v.x, v.y, v.z);
     }