Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tp_physique_app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
kevineri.bonga
tp_physique_app
Commits
605a075f
Commit
605a075f
authored
3 years ago
by
dylanmntrs
Browse files
Options
Downloads
Patches
Plain Diff
Ajout des commentaires manquants
parent
7667ff6a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
skeleton/planet/planet.c
+9
-6
9 additions, 6 deletions
skeleton/planet/planet.c
with
9 additions
and
6 deletions
skeleton/planet/planet.c
+
9
−
6
View file @
605a075f
...
...
@@ -96,11 +96,11 @@ system_t create_system(planet_t *planet, int nb_planets){
sys
.
star
=
create_planet
(
M_SOLEIL
,
R_SOLEIL
,
0
,
0
,
COLOR_YELLOW
);
return
sys
;
}
///
/// \param ctxt
/// \param system
/// \param width
/// \param height
///
Fonction d'affichage du système solaire
/// \param ctxt
Context
/// \param system
Un système solaire
/// \param width
Largeur écran en px
/// \param height
Hauteur écran en px
void
show_system
(
struct
gfx_context_t
*
ctxt
,
system_t
*
system
,
int
width
,
int
height
,
long
resolution
){
coordinates
pos_star
=
vec2_to_coordinates
(
system
->
star
.
pos
,
width
,
height
);
draw_full_circle
(
ctxt
,
pos_star
.
column
,
pos_star
.
row
,
10e8
*
(
system
->
star
.
rayon
/
resolution
),
system
->
star
.
couleur
);
...
...
@@ -122,7 +122,10 @@ void update_system(system_t *system, double delta_t){
system
->
planets
[
i
].
prec_pos
=
posInit
;
}
}
/// Fonction d'initialisation de la première position de la planète
/// \param nb_planets Nombre de planètes dans notre système solaire
/// \param system Un système solaire
/// \param delta_t Delta T
void
initialisation_pos
(
int
nb_planets
,
system_t
*
system
,
double
delta_t
)
{
for
(
int
i
=
0
;
i
<
nb_planets
;
++
i
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment