public interface clamp
If v compares less than lo, returns lo;
otherwise if hi compares less than v, returns hi; otherwise returns v.
Is also defined for lo > hi!
Module Procedures
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
integer(kind=int64),
|
intent(in) |
|
|
:: |
v |
|
integer(kind=int64),
|
intent(in) |
|
|
:: |
lo |
|
integer(kind=int64),
|
intent(in) |
|
|
:: |
hi |
|
Return Value
integer(kind=int64)
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
integer(kind=int32),
|
intent(in) |
|
|
:: |
v |
|
integer(kind=int32),
|
intent(in) |
|
|
:: |
lo |
|
integer(kind=int32),
|
intent(in) |
|
|
:: |
hi |
|
Return Value
integer(kind=int32)
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
real(kind=dp),
|
intent(in) |
|
|
:: |
v |
|
real(kind=dp),
|
intent(in) |
|
|
:: |
lo |
|
real(kind=dp),
|
intent(in) |
|
|
:: |
hi |
|
Return Value
real(kind=dp)
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
real(kind=sp),
|
intent(in) |
|
|
:: |
v |
|
real(kind=sp),
|
intent(in) |
|
|
:: |
lo |
|
real(kind=sp),
|
intent(in) |
|
|
:: |
hi |
|
Return Value
real(kind=sp)