Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double norm_dist_to(const Particle &p) {
- double x_diff = p.x - x;
- double y_diff = p.y - y;
- double z_diff = p.z - z;
- return max(MIN_DIST,
- sqrt(pow(x_diff, 2) + pow(y_diff, 2) + pow(z_diff, 2)));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement