Skip to content

Commit

Permalink
Replace calculation with function call (#11077)
Browse files Browse the repository at this point in the history
# Objective

- Simplify execution.

## Solution

- Replace degrees to radians calculation with function call.
  • Loading branch information
tygyh authored Dec 23, 2023
1 parent efb4fa5 commit 22acd62
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/bevy_mikktspace/src/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ pub unsafe fn genTangSpace<I: Geometry>(geometry: &mut I, fAngularThreshold: f32
let mut index = 0;
let iNrFaces = geometry.num_faces();
let mut bRes: bool = false;
let fThresCos: f32 =
((fAngularThreshold * 3.14159265358979323846f64 as f32 / 180.0f32) as f64).cos() as f32;
let fThresCos = fAngularThreshold.to_radians().cos();
f = 0;
while f < iNrFaces {
let verts = geometry.num_vertices_of_face(f);
Expand Down

0 comments on commit 22acd62

Please sign in to comment.