UNPKG

@styleless-ui/react

Version:

Completely unstyled, headless and accessible React UI components.

1 lines 307 B
export var wrap=function(r,n,t){return n+((r-n)%(t-n)+(t-n))%(t-n)};export var clamp=function(r,n,t){return Math.max(Math.min(r,t),n)};export var lerp=function(r,n,t){return r+t*(n-r)};export var inLerp=function(r,n,t){return(t-r)/(n-r)};export var remap=function(r,n,t,e,p){return lerp(e,p,inLerp(n,t,r))};