123456789101112131415161718192021(* Claude Code
*
* Copyright (C) 2026 Yoann Padioleau
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License
* (LGPL) as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*)(* See Tween.mli *)letlerp(a:float)(b:float)(p:float):float=a+.((b-.a)*.p)letprogress~(start:float)~(duration:float)(now:float):float=ifduration<=0.then1.elseFloat.max0.(Float.min1.((now-.start)/.duration))letvalue(curve:Ease.t)(a:float)(b:float)~(start:float)~(duration:float)(now:float):float=lerpab(curve(progress~start~durationnow))letfinished~(start:float)~(duration:float)(now:float):bool=progress~start~durationnow>=1.