Skip to content

Commit 9034974

Browse files
authored
Merge pull request #241 from Walther/push-zvxowquqmkzp
chore: use Unit::new_unchecked in random_cosine_direction()
2 parents f4d57e0 + da7a2a8 commit 9034974

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clovers/src/random.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub fn random_cosine_direction(rng: &mut SmallRng) -> Direction {
3232
let y = phi.sin() * r2.sqrt();
3333

3434
let v: Vec3 = Vec3::new(x, y, z);
35-
Unit::new_normalize(v)
35+
Unit::new_unchecked(v)
3636
}
3737

3838
/// Internal helper.

0 commit comments

Comments
 (0)