Browse Source

Replace "div" with "mul" for the "ratio" check

opt
Björn Steinbrink 8 months ago
parent
commit
bd5a6d88b5
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/barnes_hut.rs

+ 1
- 2
src/barnes_hut.rs View File

@ -65,9 +65,8 @@ impl Octree {
if self.children[cur_node].1 == 0 || {
let s = self.s[cur_node];
let s_squared = s * s;
let ratio = s_squared / d_squared;
let theta_squared = THETA * THETA;
ratio < theta_squared
s_squared < theta_squared * d_squared
}
{
// println!("s/d = {}", ratio.sqrt());


Loading…
Cancel
Save