wrap
wrap
will take a value and wrap it within a limited range.
This is useful, for instance when creating next/prev pagination.
Usage
Import from Motion:
wrap
accepts a min
and max
, and a value to wrap through that range.
Values within this range will be unaffected:
When the provided value is outside the range, it'll be wrapped back around: