Skip to content

Commit

Permalink
Move ears further to the side
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Oct 15, 2023
1 parent dea0149 commit 40a8168
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/spatial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,15 @@ impl Ear {

/// Unit vector along which sound is least attenuated
fn dir(self) -> mint::Vector3<f32> {
let x = 2.0f32.sqrt() / 2.0;
// [+-4, 0, -1] normalized
[
match self {
Ear::Left => -x,
Ear::Right => x,
},
Ear::Left => -1.0,
Ear::Right => 1.0,
} * 4.0
/ 17.0f32.sqrt(),
0.0,
-x,
-1.0 / 17.0f32.sqrt(),
]
.into()
}
Expand Down

0 comments on commit 40a8168

Please sign in to comment.