Clip function

Limit values ​​to a minimum and maximum

Description


The Clip function limits a single value, or the values ​​of a data field, to a minimum and a maximum.

If min and max are not specified, +/- 1 is used as default

Values ​​that are within the limits are adopted unchanged

Values ​​that exceed the limits are set to the limit

Syntax

Clip (value)

Clip (value, min, max)

Clip (array)

Clip (array, min, max)

Examples

Clip([-5,3,8,-2],-4,4)=-4 3 4 -2



Data field based functions

ClrRect Deletes a rectangular area
Clip Limits values of a data field
Count Returns number of elements
Diff Difference values of elements
Dim Number of dimensions of tables
Flat Joins rows of a table
GetAt Value of a specified position
GetRect Returns the specified area
Insert Inserts new elements
Join Join fields together
New Generates a new list
Pick Get selected items from a list
Remove Removes items from a list
Reverse Inverts the order in a list
Scale Converts values to a new scale
SetAt Sets a value at a position
Split Splits a list into sublists
Sum Returns the sum of all elements
Text Generates a text list
Trim Removes invalid values