Navigation

core.math.clamp

Inputs

Name

Type

Title

Mandatory

Description

input

core.type.f64

Input

True

None

min

core.type.f64

Minimum value

True

None

max

core.type.f64

Maximum value

True

None

Outputs

Name

Type

Title

Description

output

core.type.f64

Output

None

Parameters

Function has no parameters

State variables

Function has no state variables

Usage XML code snippet

core_math_clamp snippet for FLOW configuration file
<f name="clamp" by_spec="core.math.clamp">
    <in alias="input">some_block_1/output</in>
    <in alias="min">some_block_2/output</in>
    <in alias="max">some_block_3/output</in>
</f>

Function’s artifacts

declaration.py
from fspeclib import *


Function(
    name='core.math.clamp',
    title=LocalizedString(
        en='Clamp number into range'
    ),
    description=None,
    inputs=[
        Input(
            name='input',
            title='Input',
            value_type='core.type.f64'
        ),
        Input(
            name='min',
            title='Minimum value',
            value_type='core.type.f64'
        ),
        Input(
            name='max',
            title='Maximum value',
            value_type='core.type.f64'
        )
    ],
    outputs=[
        Output(
            name='output',
            title='Output',
            value_type='core.type.f64'
        )
    ]
)
Need more info?