Nitpicking

This commit is contained in:
Abreu 2021-09-11 18:57:16 -03:00
parent 06d1c4ac5c
commit 43c3b41498
No known key found for this signature in database
GPG Key ID: 64835466FF55F7E1
1 changed files with 6 additions and 6 deletions

View File

@ -44,13 +44,13 @@ void sortLine(Barrel * line) {
int loadBarrel (Barrel * reservoir, Barrel b) {
float capacity = b.juice + b.alcohol;
if (reservoir->juice - capacity * 0.86 >= -EPSILON
&& reservoir->alcohol - capacity * 0.14 >= -EPSILON) {
reservoir->juice -= capacity * 0.86;
reservoir->alcohol -= capacity * 0.14;
return b.no;
}
if (reservoir->juice - capacity * 0.86 < -EPSILON
|| reservoir->alcohol - capacity * 0.14 < -EPSILON)
return 0;
reservoir->juice -= capacity * 0.86;
reservoir->alcohol -= capacity * 0.14;
return b.no;
}
int balance() {