Skip to content

Commit

Permalink
🐛 표준체중 구하는 공식 오류. 불필요한 로직 제거
Browse files Browse the repository at this point in the history
ref #19
  • Loading branch information
sculove committed Sep 29, 2018
1 parent 7c58acc commit c85a00d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion part1/03.logic/logic-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h2>개선 전 예제</h2>
broca = (user.height - 100 * 0.9).toFixed(2);
bmi = (user.height / 100 * user.height / 100 * 22).toFixed(2);
} else {
broca = (user.height - 100 * 0.9).toFixed(2);
broca = (user.height - 105 * 0.9).toFixed(2);
bmi = (user.height / 100 * user.height / 100 * 21).toFixed(2);
}
const obesityUsingBroca = ((user.mass - broca) / broca * 100).toFixed(2);
Expand Down
2 changes: 1 addition & 1 deletion part1/03.logic/logic-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h2>개선 후 예제</h2>
bmi = (height / 100 * height / 100 * 22).toFixed(2);
} else {
broca = (height - 100 * 0.9).toFixed(2);
bmi = (height / 100 * height / 100 * 21).toFixed(2);
bmi = (height / 100 * height / 105 * 21).toFixed(2);
}
const obesityUsingBroca = ((mass - broca) / broca * 100).toFixed(2);
const obesityUsingBmi = ((mass - bmi) / bmi * 100).toFixed(2);
Expand Down
7 changes: 0 additions & 7 deletions part1/03.logic/logic-rx.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ <h2>rxjs 사용 예제</h2>
function logic(height, mass, gender) {
let broca = (height - (gender === "male" ? 100 : 105)) * 0.9;
let bmi = height / 100 * height / 100 * (gender === "male" ? 22 : 21);
if (gender == "male") {
broca = (height - 100 * 0.9).toFixed(2);
bmi = (height / 100 * height / 100 * 22).toFixed(2);
} else {
broca = (height - 100 * 0.9).toFixed(2);
bmi = (height / 100 * height / 100 * 21).toFixed(2);
}
const obesityUsingBroca = ((mass - broca) / broca * 100).toFixed(2);
const obesityUsingBmi = ((mass - bmi) / bmi * 100).toFixed(2);
return {
Expand Down

0 comments on commit c85a00d

Please sign in to comment.