You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The clip function works on arrays and not on a single value, which is strange as all other similar functions work on a single value.
Therefore I'd propose to change the definition to:
{
"id": "clip",
"summary": "Clips a value between a minimum and a maximum value.",
"description": "Clips a number between specified minimum and maximum values. A value larger than the maximal value will have the maximal value, a value lower than minimal value will have the minimal value.",
"categories": [
"math"
],
"parameter_order": [
"x",
"min",
"max"
],
"parameters": {
"x": {
"description": "A number.",
"schema": {
"type": [
"number",
"null"
]
},
"required": true
},
"min": {
"description": "Minimum value. If the value is lower than this value, the process will return the value of this parameter.",
"schema": {
"type": "number"
},
"required": true
},
"max": {
"description": "Maximum value. If the value is greater than this value, the process will return the value of this parameter.",
"schema": {
"type": "number"
},
"required": true
}
},
"returns": {
"description": "The value clipped to the specified range.",
"schema": {
"type": [
"number",
"null"
]
}
},
"examples": [
{
"arguments": {
"x": -5,
"min": -1,
"max": 1
},
"returns": -1
},
{
"arguments": {
"x": 10.001,
"min": 1,
"max": 10
},
"returns": 10
},
{
"arguments": {
"x": 0.000001,
"min": 0,
"max": 0.02
},
"returns": 0.000001
},
{
"arguments": {
"x": null,
"min": 0,
"max": 1
},
"returns": null
}
]
}
The text was updated successfully, but these errors were encountered:
The clip function works on arrays and not on a single value, which is strange as all other similar functions work on a single value.
Therefore I'd propose to change the definition to:
The text was updated successfully, but these errors were encountered: