1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-17 22:11:35 +02:00

Apply missing part of the YunmaiLib.getFat logic (#520)

resistance value should apply `sqrt` when that value is greater than 200
This commit is contained in:
Sunguk Lee
2019-12-04 23:32:32 +09:00
committed by OliE
parent 8a0381eb43
commit bb374495e0

View File

@@ -36,6 +36,10 @@ public class YunmaiLib {
float r = (resistance - 100.0f) / 100.0f;
float h = height / 100.0f;
if (r >= 1) {
r = (float)Math.sqrt(r);
}
if (this.sex == 1) {
fat = (weight * 1.5f / h / h) + (age * 0.08f) - 10.8f;
} else {