Skip to content

Commit

Permalink
who lints ya, baby?
Browse files Browse the repository at this point in the history
  • Loading branch information
mreinstein committed Mar 26, 2024
1 parent c69ed3d commit b4a65eb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/vec2-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,10 @@ export function setLength(a: Vec2, len: number, dst?: Vec2) {
export function truncate(a: Vec2, maxLen: number, dst?: Vec2) {
dst = dst || new VecType(2);

if (length(a) > maxLen)
if (length(a) > maxLen) {
return setLength(a, maxLen, dst);

}

return copy(a, dst);
}

Expand Down
5 changes: 3 additions & 2 deletions src/vec3-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,10 @@ export function setLength(a: Vec3, len: number, dst?: Vec3) {
export function truncate(a: Vec3, maxLen: number, dst?: Vec3) {
dst = dst || new VecType(3);

if (length(a) > maxLen)
if (length(a) > maxLen) {
return setLength(a, maxLen, dst);

}

return copy(a, dst);
}

Expand Down
5 changes: 3 additions & 2 deletions src/vec4-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,10 @@ export function setLength(a: Vec4, len: number, dst?: Vec4) {
export function truncate(a: Vec4, maxLen: number, dst?: Vec4) {
dst = dst || new VecType(4);

if (length(a) > maxLen)
if (length(a) > maxLen) {
return setLength(a, maxLen, dst);

}

return copy(a, dst);
}

Expand Down

0 comments on commit b4a65eb

Please sign in to comment.