Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改了罩杯计算方法 #915

Merged
merged 1 commit into from
Oct 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions content/zh-cn/cup-calculator.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ description: "罩杯计算器"
border-image-outset: 0px;
}
</style>
*由于按照国际通用罩杯计算方法修改了计算法,所以计算结果与原来相比可能偏小,不必担心。*

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

1. 请准备一根软尺并面对镜子,看得到胸部
Expand All @@ -30,6 +32,14 @@ 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 @@ -41,38 +51,39 @@ 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 xia = (val1 + val2 )/2;
var cup = (val3 + val4 + val5)/3 - xia;
var under = (val1 + val2 )/2;
var upper = (val3 + val4 + val5)/3;
var cup = ( upper - under - 11 ) / 2;

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

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

1. 請準備一條量身軟尺,面向鏡子,要能看到胸部
Expand All @@ -30,6 +32,14 @@ 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 @@ -41,38 +51,39 @@ 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 xia = (val1 + val2 )/2;
var cup = (val3 + val4 + val5)/3 - xia;
var under = (val1 + val2 )/2;
var upper = (val3 + val4 + val5)/3;
var cup = ( upper - under - 11 ) / 2;

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