First commit
This commit is contained in:
12
IUT/Info1/TD/Exercices/5.6_courbure_terre/distance.cpp
Normal file
12
IUT/Info1/TD/Exercices/5.6_courbure_terre/distance.cpp
Normal file
@@ -0,0 +1,12 @@
|
||||
#include "distance.h"
|
||||
#include <cmath>
|
||||
|
||||
double Distance(double hauteur, double rayonPlanete) {
|
||||
double distanceHorizon;
|
||||
double distanceCentreHomme;
|
||||
|
||||
distanceCentreHomme = rayonPlanete + hauteur;
|
||||
distanceHorizon = pow(distanceCentreHomme, 2) - pow(rayonPlanete, 2);
|
||||
|
||||
return distanceHorizon;
|
||||
}
|
||||
Reference in New Issue
Block a user