Cria método para consertar as porcentagens
This commit is contained in:
parent
30b32f21e6
commit
2da851008a
|
|
@ -1,4 +1,5 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <math.h>
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char id[30];
|
char id[30];
|
||||||
char name[200];
|
char name[200];
|
||||||
|
|
@ -94,5 +95,9 @@ void read_release_date(Musica *music, char field[]) {
|
||||||
music->release_date[7] = '/';
|
music->release_date[7] = '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double handle_percentage(double value) {
|
||||||
|
return ceil(value) == value ? value / 100 : value;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue