From 89fc7fd56fd871ecdb7c56a61cdc027ce256649c Mon Sep 17 00:00:00 2001
From: "Peter W. Draper" <p.w.draper@durham.ac.uk>
Date: Mon, 31 Oct 2016 12:29:43 +0000
Subject: [PATCH] Fix typo r_inv, should be rinv

---
 src/potential/point_mass/potential.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/potential/point_mass/potential.h b/src/potential/point_mass/potential.h
index 9f7533d80e..5f3d1c27b8 100644
--- a/src/potential/point_mass/potential.h
+++ b/src/potential/point_mass/potential.h
@@ -133,7 +133,7 @@ external_gravity_get_potential_energy(
   const float dy = g->x[1] - potential->y;
   const float dz = g->x[2] - potential->z;
   const float rinv = 1. / sqrtf(dx * dx + dy * dy + dz * dz);
-  return -phys_const->const_newton_G * potential->mass * r_inv;
+  return -phys_const->const_newton_G * potential->mass * rinv;
 }
 
 /**
-- 
GitLab