fixed a typo

This commit is contained in:
Daniel Knüttel 2019-07-16 21:19:04 +02:00
parent 1e9bc3209c
commit 26acc9802d

View File

@ -129,7 +129,7 @@ interaction_ufunc_float2D
// Stuff we will need:
float r; // Distance between interacting particles.
float delta_x_e; // x-component of unit direction vector.
float delty_y_e; // y-component of unit direction vector.
float delta_y_e; // y-component of unit direction vector.
float delta_p_x;
float delta_p_y;
@ -162,7 +162,7 @@ interaction_ufunc_float2D
if(r > 0)
{
delta_x_e = (this_x_i - this_x_j) / r;
delty_y_e = (this_y_i - this_y_j) / r;
delta_y_e = (this_y_i - this_y_j) / r;
}
else
{
@ -172,13 +172,13 @@ interaction_ufunc_float2D
printf("Warning: corrected r = 0 with random angle pi*%f\n", random_angle / M_PI);
#endif
delta_x_e = cosf(random_angle);
delty_y_e = sinf(random_angle);
delta_y_e = sinf(random_angle);
}
// Update the momenta.
delta_p_x = delta_x_e * interaction_force_function(r, coefficients);
delta_p_y = delty_y_e * interaction_force_function(r, coefficients);
delta_p_y = delta_y_e * interaction_force_function(r, coefficients);
#ifdef WARN_NAN_OCCUR
if(isnan(delta_p_x))
{