[수정] 모유 - 모유계산기 오류 수정

dev_bert
isol2011 3 years ago
parent 01ed01ea11
commit 2b7b4b9d0f

@ -60,7 +60,7 @@ public class ConstantDB {
}
// 수유 분, 수유 추가 초 -> level
public static final int getLevel(int m, int s) {
return (int)Math.ceil((m * 60 + s) / 60f);
public static final int getLevel(int m, int s) {
return (int)Math.floor((m * 60 + s ) / 60f)+(m+s==0?0:1);
}
}

@ -39,9 +39,9 @@ public class WeightCalculation {
public static void main(String[] args) {
// TODO Auto-generated method stub
WeightCalculation input = new WeightCalculation("N", "2021-06-01", "2022-07-13",407);
WeightCalculation input = new WeightCalculation("N", "2022-03-01", "2022-07-13",134);
float weight = input.estimateHuman(2, 10, 1, 30);
float weight = input.estimateHuman(10, 0, 6, 59);
System.out.println(weight);
}

Loading…
Cancel
Save