1. Alexander Konovalov
  2. nbody

Commits

Alexander Konovalov  committed 40d213c

norm() -> squaredNorm() in FindNearest99Neighbours.

  • Participants
  • Parent commits 25ebb26
  • Branches master

Comments (0)

Files changed (1)

File core/core.cpp

View file
  • Ignore whitespace
     size_t particleCount = particles.size();
 
     for (size_t i = 0; i < particleCount; i++) {
-        rff[i] = (particles[i].p - particles[j].p).norm();
+        rff[i] = (particles[i].p - particles[j].p).squaredNorm();
         rf[i] = rff[i];
     }