Skip to content

Commit

Permalink
Revert "修改了罩杯计算方法 (#915)"
Browse files Browse the repository at this point in the history
This reverts commit b9d8acc.
  • Loading branch information
Cryolitia committed Oct 28, 2023
1 parent d331876 commit 05d8258
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 46 deletions.
35 changes: 12 additions & 23 deletions content/zh-cn/cup-calculator.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ description: "罩杯计算器"
border-image-outset: 0px;
}
</style>
*由于按照国际通用罩杯计算方法修改了计算法,所以计算结果与原来相比可能偏小,不必担心。*

**运算都在您的本地完成,不收集任何数据**

1. 请准备一根软尺并面对镜子,看得到胸部
Expand All @@ -32,14 +30,6 @@ description: "罩杯计算器"
1. 请俯身 45 度:<input type="text" id="val4"/> cm
1. 请鞠躬 90 度:<input type="text" id="val5"/> cm

国际通用罩杯计算方法:

- 下胸围 + 11 cm + n × 2 cm = 胸围

- 罩杯 n =(胸围 − 下胸围 − 11) / 2

数字 n 代表罩杯 (A=1、B=2、C=3依此类推)。例如,胸围和下胸围差为15 cm (n=2)表示B罩杯。

<button onclick="cup()" type="submit">提交</button>

<p id="result"></p>
Expand All @@ -51,39 +41,38 @@ description: "罩杯计算器"
var val3 = Number(window.document.getElementById("val3").value) || NaN;
var val4 = Number(window.document.getElementById("val4").value) || NaN;
var val5 = Number(window.document.getElementById("val5").value) || NaN;
var under = (val1 + val2 )/2;
var upper = (val3 + val4 + val5)/3;
var cup = ( upper - under - 11 ) / 2;
var xia = (val1 + val2 )/2;
var cup = (val3 + val4 + val5)/3 - xia;

if (isNaN(cup)) {
window.document.getElementById("result").innerHTML = "数值错误,再检查检查吧";
return;
} else if (cup<=0){
} else if (cup<5){
window.document.getElementById("result").innerHTML = "小妹妹你还不需要穿内衣哦";
return;
} else if (cup<1){
} else if (cup<=7.5){
cup = "AA,买少女小背心去吧";
} else if (cup<=2){
} else if (cup<=10){
cup = "A";
} else if (cup<3){
} else if (cup<=12.5){
cup = "B";
} else if (cup<4){
} else if (cup<=15){
cup = "C";
} else if (cup<5){
} else if (cup<=17.5){
cup = "D";
} else if (cup<6){
} else if (cup<=20){
cup = "E";
}else{
window.document.getElementById("result").innerHTML = "你胸大你说了算(罩杯超出 MtF.wiki 预设)";
return;
}
if (isNaN(under)) {
if (isNaN(xia)) {
window.document.getElementById("result").innerHTML = "数值错误,再检查检查吧";
return;
} else{
under = Math.ceil(under/5)*5;
xia = Math.ceil(xia/5)*5;
}
window.document.getElementById("result").innerHTML = under + cup;
window.document.getElementById("result").innerHTML = xia + cup;
return;
}
</script>
35 changes: 12 additions & 23 deletions content/zh-hant/cup-calculator.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ description: "胸圍計算"
border-image-outset: 0px;
}
</style>
*由於按照國際通用罩杯計算方法修改了計算法,所以計算結果與原來相比可能偏小,不必擔心。*

**計算會在你的電腦上完成,不會向伺服器回傳任何資料**

1. 請準備一條量身軟尺,面向鏡子,要能看到胸部
Expand All @@ -32,14 +30,6 @@ description: "胸圍計算"
1. 請俯身 45 度:<input type="text" id="val4"/> cm
1. 請鞠躬 90 度:<input type="text" id="val5"/> cm

國際通用胸罩尺碼計算方法:

- 下胸圍 + 11 cm + n × 2 cm = 胸圍

- 罩杯 n =(胸圍 − 下胸圍 − 11) / 2

數字 n 代表罩杯 (A=1、B=2、C=3依此類推)。例如,胸圍和下胸圍差為15 cm (n=2)表示B罩杯。

<button onclick="cup()" type="submit">計算</button>

<p id="result"></p>
Expand All @@ -51,39 +41,38 @@ description: "胸圍計算"
var val3 = Number(window.document.getElementById("val3").value) || NaN;
var val4 = Number(window.document.getElementById("val4").value) || NaN;
var val5 = Number(window.document.getElementById("val5").value) || NaN;
var under = (val1 + val2 )/2;
var upper = (val3 + val4 + val5)/3;
var cup = ( upper - under - 11 ) / 2;
var xia = (val1 + val2 )/2;
var cup = (val3 + val4 + val5)/3 - xia;

if (isNaN(cup)) {
window.document.getElementById("result").innerHTML = "輸入有誤,再檢查一下吧";
return;
} else if (cup<=0){
} else if (cup<5){
window.document.getElementById("result").innerHTML = "小妹妹妳還不需要穿內衣唷";
return;
} else if (cup<1){
} else if (cup<=7.5){
cup = "AA,購買少女內衣";
} else if (cup<2){
} else if (cup<=10){
cup = "A";
} else if (cup<3){
} else if (cup<=12.5){
cup = "B";
} else if (cup<4){
} else if (cup<=15){
cup = "C";
} else if (cup<5){
} else if (cup<=17.5){
cup = "D";
} else if (cup<6){
} else if (cup<=20){
cup = "E";
}else{
window.document.getElementById("result").innerHTML = "妳胸大妳說了算(罩杯超出 MtF.wiki 預設)";
return;
}
if (isNaN(under)) {
if (isNaN(xia)) {
window.document.getElementById("result").innerHTML = "輸入有誤,再檢查一下吧";
return;
} else{
under = Math.ceil(under/5)*5;
xia = Math.ceil(xia/5)*5;
}
window.document.getElementById("result").innerHTML = under + cup;
window.document.getElementById("result").innerHTML = xia + cup;
return;
}
</script>

0 comments on commit 05d8258

Please sign in to comment.