Skip to content

Commit

Permalink
Merge pull request #88 from S-AT/Fix-typo-in-vector3d.js
Browse files Browse the repository at this point in the history
Typo fixed
  • Loading branch information
chrisveness committed Dec 23, 2020
2 parents 3a18e95 + 493fa39 commit 33d1bf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vector3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Vector3d {
* const v = new Vector3d(0.267, 0.535, 0.802);
*/
constructor(x, y, z) {
if (isNaN(x) || isNaN(x) || isNaN(x)) throw new TypeError(`invalid vector [${x},${y},${z}]`);
if (isNaN(x) || isNaN(y) || isNaN(z)) throw new TypeError(`invalid vector [${x},${y},${z}]`);

this.x = Number(x);
this.y = Number(y);
Expand Down

0 comments on commit 33d1bf5

Please sign in to comment.