Floating Point Intrinsic Functions - Bound Method

Apply boundary values to the variable

Member of Floating Point Intrinsic Functions (PRIM_LIBI.IFloatingPointIntrinsics)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

Float

Resulting number

NumberOne

*Input

Float

Lower boundary

NumberTwo

*Input

Float

Upper boundary

Details

Bound returns a value limuted by the two value supplied.

If the variable is greater than the bounds, the upper bound is returned. If lower, the lower bound is returned. If the variable is within the bounds, the variable is returned unmodified.

Example

In this example, if #Number contained 150, #Result would be set to 100. If #Number contained 0, #Result would be set to 1. If #Number contained 42, result would be set to 42.

     #Result := #Number.Bound(1 100)

See also

All Component Classes

Technical Reference

  • No labels