Skip to content
Snippets Groups Projects
Commit 1d1f590e authored by tanguy.cavagna's avatar tanguy.cavagna :desktop:
Browse files

Renamed E

parent aea4ebf0
No related branches found
No related tags found
No related merge requests found
Pipeline #14868 failed
......@@ -17,8 +17,8 @@ bool compute_e(charge_t c, vec2 p, double eps, vec2 *e)
{
vec2 qP = vec2_sub(p, c.pos);
double norm = vec2_norm(qP);
double bigE = K * c.q / pow(norm, 2); // E = k * (Q / r^2)
*e = vec2_mul(vec2_div(qP, norm), bigE); // e = E * qP / ||qP||
double E = K * c.q / pow(norm, 2); // E = k * (Q / r^2)
*e = vec2_mul(vec2_div(qP, norm), E); // e = E * qP / ||qP||
return (norm > eps);
}
......
......@@ -12,7 +12,6 @@
#define _CHARGE_H_
#define K 8.988e9
#define E 1.602e-19
#define CHARGE_RADIUS 10
#define EPS 0.025
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment