Clip a number so that it does not exceed the specified bounds.
裁剪一个数字,使其不超过指定的边界。
For example, if an input value is 1.5, but the Max bound is set to 1, the output value will be clipped to 1.
例如,如果输入值为1.5,但Max bound设置为1,则输出值将被裁剪为1。
输入口
Value 值
A number to clip.
要裁剪的值。
Min 最小
The lowest number to allow. The output value must be greater than or equal to this number.
允许的最小数字。
输出值必须大于或等于此数字。
Max 最大
The highest number to allow. The output value must be lower than or equal to this number.
允许的最大数字。
输出值必须小于或等于此数字。
输入口
Output 输出
The clipped value.
裁剪过的值。
Related Patches
ProgressTransition
Related Learn Content
Horizontal Scrolling
Create horizontal paging carousels.
Related Examples
Facebook New Stories
Trigger a prompt to appear when the News Feed is scrolled a certain distance.
Facebook Popular Events
Create simple horizontal scrolling carousels.
Instagram Adjust
Use drag to control the Instagram straighten tool.
Instagram Carousel
Create horizontal scrolling with page indicators.
Instagram Compose
Switch between the Instagram upload options.
Instagram Notifications
Switch between notifications with animation.
Instagram Stories Scroll
Tap to switch between read and unread Instagram Stories.