Commit d5e85e12 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Made the magical constant in the potential timestep a #define constant

parent 288b3ca8
......@@ -48,6 +48,8 @@ struct external_potential {
/* Include exteral pointmass potential */
#ifdef EXTERNAL_POTENTIAL_POINTMASS
#define EXTERNAL_GRAVITY_TIMESTEP_PREFACTOR 0.03f
/**
* @brief Computes the time-step due to the acceleration from a point mass
*
......@@ -79,7 +81,7 @@ __attribute__((always_inline))
const float a_2 = g->a_grav[0] * g->a_grav[0] + g->a_grav[1] * g->a_grav[1] +
g->a_grav[2] * g->a_grav[2];
return 0.03f * sqrtf(a_2 / dota_2);
return EXTERNAL_GRAVITY_TIMESTEP_PREFACTOR * sqrtf(a_2 / dota_2);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment