Skip to content

Commit bfb9176

Browse files
committed
Remove unnecessary Vec4 to [f32; 4] conversion
1 parent 1f637b8 commit bfb9176

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/bevy_mesh/src/gramschmidt.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::{GenerateTangentsError, Mesh};
2-
use bevy_math::{Vec2, Vec3A, Vec4};
2+
use bevy_math::{Vec2, Vec3A};
33
use wgpu_types::{PrimitiveTopology, VertexFormat};
44

55
struct TriangleIndexIter<'a, I>(&'a mut I);
@@ -120,8 +120,7 @@ pub(crate) fn generate_tangents_for_mesh(
120120
// a deviation from the general algorithm. The generated mikktspace tangents are
121121
// also post processed to flip the sign.
122122
let handedness = handedness * -1.0;
123-
result_tangents
124-
.push(Vec4::new(tangent.x, tangent.y, tangent.z, handedness).to_array());
123+
result_tangents.push([tangent.x, tangent.y, tangent.z, handedness]);
125124
}
126125

127126
Ok(result_tangents)

0 commit comments

Comments
 (0)