11 lines
236 B
C
11 lines
236 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <math.h>
|
|
#include "gravity.h"
|
|
|
|
|
|
double calcul_gravity_object(const double grav, const double masse, const double r){
|
|
// Newton's law for gravitation
|
|
return grav * (masse / pow(r, 2));
|
|
}
|