Variants.VarEnsureRange
From RAD Studio VCL Reference
C++ Information
From Variants.hpp
System::Variant __fastcall VarEnsureRange(const System::Variant & AValue, const System::Variant & AMin, const System::Variant & AMax);
Unit: Variants
Type: function
Description
Returns a Variant with a value in a specified range.
VarEnsureRange returns a Variant whose value is guaranteed to be within a specified range.
AValue is a Variant with the value you want as long as it is in range. If AValue is in range, VarEnsureRange returns AValue.
AMin is a Variant with the minimum acceptable value. If AValue is less than AMin, VarEnsureRange returns AMin.
AMax is a Variant with the maximum acceptable value. If AValue is greater than AMax, VarEnsureRange returns AMax.