metafide-surge
Version:
Metafide Surge Game Computation
15 lines (14 loc) • 711 B
TypeScript
import { AllocationPercentages, RangePlayer, SpotPlayer } from './types';
/**
* Default allocation percentages used if none are provided.
*/
export declare const DEFAULT_RANGE_ALLOCATION_PERCENTAGES: AllocationPercentages;
export declare const DEFAULT_SPOT_ALLOCATION_PERCENTAGES: AllocationPercentages;
/**
* Scales down a number from 1e8, safely handling all edge cases.
* @param value - The input value to scale
* @returns The scaled value, or 0 if input is invalid
*/
export declare function scaleFrom1e8(value: number | undefined | null): number;
export declare function serializeRangePlayer(data: RangePlayer): RangePlayer;
export declare function serializeSpotPlayer(data: SpotPlayer): SpotPlayer;