@interval-health/capacitor-health 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1379,7 +1379,8 @@ final class Health {
|
|
|
1379
1379
|
case .bodyFatPercentage:
|
|
1380
1380
|
// Convert decimal to percentage: 0.25 -> 25%
|
|
1381
1381
|
let valueInDecimal = sample.quantity.doubleValue(for: HKUnit.percent())
|
|
1382
|
-
|
|
1382
|
+
let percentageValue = valueInDecimal * 100
|
|
1383
|
+
dayData["bodyFat"] = round(percentageValue * 10) / 10 // 1 decimal place
|
|
1383
1384
|
|
|
1384
1385
|
default:
|
|
1385
1386
|
break
|
package/package.json
CHANGED