react-native-reanimated
Version:
More powerful alternative to Animated library for React Native.
19 lines (18 loc) • 763 B
TypeScript
export declare enum Extrapolation {
IDENTITY = "identity",
CLAMP = "clamp",
EXTEND = "extend"
}
export interface ExtrapolationConfig {
extrapolateLeft?: Extrapolation | string;
extrapolateRight?: Extrapolation | string;
}
export type ExtrapolationType = ExtrapolationConfig | Extrapolation | string | undefined;
export declare function interpolate(x: number, input: readonly number[], output: readonly number[], type?: ExtrapolationType): number;
/**
* @param value value to be clamped
* @param min minimum allowed value
* @param max maximum allowed value
* Clamps given value within a range of values between a defined minimum bound and a maximum bound.
*/
export declare function clamp(value: number, min: number, max: number): number;