evm_clamp
Constrains x to the inclusive range [lo, hi] when lo <= hi. For compatibility, reversed bounds lo > hi return lo; reversed bounds do not describe a valid interval. NULL input propagates to NULL.
Example
Local
{"id":"sample_y8ylk9","title":"Sample","code":"SELECT evm_clamp(7::UINT256, 10::UINT256, 5::UINT256)::VARCHAR AS result;\n-- => [{\"result\":\"10\"}]"}
Notebook ready in readonly mode.
API reference
Exact signatures with descriptions, requirements, inputs, returns, and examples.
Related functions
Category and tags
- Category
- EVM utilities
- Tag
- Types
- Tag
- EVM