diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-16 15:03:54 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-16 15:03:54 +0200 |
| commit | 283c876aff2c1a5477955140df783a70ab76dbd8 (patch) | |
| tree | 5a3dbdce25e549fbed983ed839fdad39c9d3d21f /web/frontend/official-climb-profile-logic.ts | |
| parent | df7c9b5130ba193fc918a947a461f2a70dc2dd3c (diff) | |
feat(web): improve official climb profile
Diffstat (limited to 'web/frontend/official-climb-profile-logic.ts')
| -rw-r--r-- | web/frontend/official-climb-profile-logic.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/web/frontend/official-climb-profile-logic.ts b/web/frontend/official-climb-profile-logic.ts index 1b2bc83..893588d 100644 --- a/web/frontend/official-climb-profile-logic.ts +++ b/web/frontend/official-climb-profile-logic.ts @@ -14,12 +14,11 @@ const profileStepSizesM: number[] = [100, 200, 500, 1000]; const displayStepForLength = (lengthM: number): number => profileStepSizesM.find((stepM) => Math.ceil(lengthM / stepM) <= 30) || profileStepSizesM[profileStepSizesM.length - 1]; const profileBandForSlope = (slopePercent: number): ProfileBand => { - if (slopePercent < 0) return "downhill"; + if (slopePercent <= 0) return "downhill"; if (slopePercent < 3) return "0-3"; if (slopePercent < 6) return "3-6"; if (slopePercent < 9) return "6-9"; - if (slopePercent < 12) return "9-12"; - return "12-plus"; + return "9-plus"; }; const officialProfileSections = (points: ProfilePoint[], startIndex: number, endIndex: number, stepM: number): OfficialProfileSection[] => { const startDistanceM = points[startIndex].distanceKm * 1000; |