UNPKG

@vreippainen/hevy-mcp-server

Version:
49 lines (48 loc) 1.82 kB
/** * Utility functions for calculating estimated one-rep max (1RM) * based on weight and repetitions performed. * * Implements four common formulas: * 1. Brzycki: Weight × (36 / (37 - reps)) * 2. Epley: Weight × (1 + (0.0333 × reps)) * 3. Lombardi: Weight × (reps ^ 0.1) * 4. O'Conner: Weight × (1 + (0.025 × reps)) * * Note: These formulas are generally less accurate beyond 10-15 repetitions */ export declare enum OneRepMaxFormula { BRZYCKI = "brzycki", EPLEY = "epley", LOMBARDI = "lombardi", OCONNER = "oconner" } /** * Calculates estimated one-rep max using the Brzycki formula * Weight × (36 / (37 - reps)) */ export declare function brzyckiFormula(weight: number, reps: number): number; /** * Calculates estimated one-rep max using the Epley formula * Weight × (1 + (0.0333 × reps)) */ export declare function epleyFormula(weight: number, reps: number): number; /** * Calculates estimated one-rep max using the Lombardi formula * Weight × (reps ^ 0.1) */ export declare function lombardiFormula(weight: number, reps: number): number; /** * Calculates estimated one-rep max using the O'Conner formula * Weight × (1 + (0.025 × reps)) */ export declare function oconnerFormula(weight: number, reps: number): number; /** * Calculates the estimated one-rep max (1RM) using the specified formula. * * @param weight - The weight lifted in kg * @param reps - The number of repetitions performed * @param formula - The formula to use for calculation (default: Brzycki) * @param maxAllowedReps - Maximum number of reps to consider valid (default: 15) * @returns The calculated one-rep max or null if inputs are invalid */ export declare function calculateEstimated1RM(weight: number, reps: number, formula?: OneRepMaxFormula, maxAllowedReps?: number): number | null;