Skip to content

Commit

Permalink
Fix: lerp() for 3D points where z is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavtotla committed Apr 30, 2021
1 parent cb4fe3e commit 9832af0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Expand Up @@ -288,7 +288,7 @@ const utils = {
x: v1.x + r * (v2.x - v1.x),
y: v1.y + r * (v2.y - v1.y),
};
if (!!v1.z && !!v2.z) {
if (v1.z !== undefined && v2.z !== undefined) {
ret.z = v1.z + r * (v2.z - v1.z);
}
return ret;
Expand Down

0 comments on commit 9832af0

Please sign in to comment.