Spaces:
Running
Running
fix
Browse files- src/utils/metricAcwr.ts +2 -8
src/utils/metricAcwr.ts
CHANGED
|
@@ -395,15 +395,9 @@ export function calculateMetricACWR(
|
|
| 395 |
|
| 396 |
if (Math.abs(denominator) > 0.001) {
|
| 397 |
targetTomorrowValue = numerator / denominator;
|
| 398 |
-
|
| 399 |
-
// If negative and target ACWR < 1.0, set to 0 (rest day recommended)
|
| 400 |
-
// If negative and target ACWR >= 1.0, set to null (target unreachable)
|
| 401 |
if (targetTomorrowValue < 0) {
|
| 402 |
-
|
| 403 |
-
targetTomorrowValue = 0;
|
| 404 |
-
} else {
|
| 405 |
-
targetTomorrowValue = null;
|
| 406 |
-
}
|
| 407 |
}
|
| 408 |
} else {
|
| 409 |
// Special case: targetACWR ≈ 4, need different approach
|
|
|
|
| 395 |
|
| 396 |
if (Math.abs(denominator) > 0.001) {
|
| 397 |
targetTomorrowValue = numerator / denominator;
|
| 398 |
+
// If negative, set to 0 (rest day recommended)
|
|
|
|
|
|
|
| 399 |
if (targetTomorrowValue < 0) {
|
| 400 |
+
targetTomorrowValue = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 401 |
}
|
| 402 |
} else {
|
| 403 |
// Special case: targetACWR ≈ 4, need different approach
|