Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
Returns value
clamped to the inclusive range of min
and max
.
public:
static float Clamp(float value, float min, float max);
public static float Clamp(float value, float min, float max);
static member Clamp : single * single * single -> single
Public Shared Function Clamp (value As Single, min As Single, max As Single) As Single
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
-or-
Exceptions Clamp(UIntPtr, UIntPtr, UIntPtr)Important
This API is not CLS-compliant.
Returns value
clamped to the inclusive range of min
and max
.
public:
static UIntPtr Clamp(UIntPtr value, UIntPtr min, UIntPtr max);
[System.CLSCompliant(false)]
public static UIntPtr Clamp(UIntPtr value, UIntPtr min, UIntPtr max);
[System.CLSCompliant(false)]
public static nuint Clamp(nuint value, nuint min, nuint max);
[<System.CLSCompliant(false)>]
static member Clamp : unativeint * unativeint * unativeint -> unativeint
Public Shared Function Clamp (value As UIntPtr, min As UIntPtr, max As UIntPtr) As UIntPtr
Parameters
nuint
unativeint
The value to be clamped.
nuint
unativeint
The lower bound of the result.
nuint
unativeint
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Important
This API is not CLS-compliant.
Returns value
clamped to the inclusive range of min
and max
.
public:
static System::UInt64 Clamp(System::UInt64 value, System::UInt64 min, System::UInt64 max);
[System.CLSCompliant(false)]
public static ulong Clamp(ulong value, ulong min, ulong max);
[<System.CLSCompliant(false)>]
static member Clamp : uint64 * uint64 * uint64 -> uint64
Public Shared Function Clamp (value As ULong, min As ULong, max As ULong) As ULong
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Important
This API is not CLS-compliant.
Returns value
clamped to the inclusive range of min
and max
.
public:
static System::UInt32 Clamp(System::UInt32 value, System::UInt32 min, System::UInt32 max);
[System.CLSCompliant(false)]
public static uint Clamp(uint value, uint min, uint max);
[<System.CLSCompliant(false)>]
static member Clamp : uint32 * uint32 * uint32 -> uint32
Public Shared Function Clamp (value As UInteger, min As UInteger, max As UInteger) As UInteger
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Important
This API is not CLS-compliant.
Returns value
clamped to the inclusive range of min
and max
.
public:
static System::UInt16 Clamp(System::UInt16 value, System::UInt16 min, System::UInt16 max);
[System.CLSCompliant(false)]
public static ushort Clamp(ushort value, ushort min, ushort max);
[<System.CLSCompliant(false)>]
static member Clamp : uint16 * uint16 * uint16 -> uint16
Public Shared Function Clamp (value As UShort, min As UShort, max As UShort) As UShort
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Important
This API is not CLS-compliant.
Returns value
clamped to the inclusive range of min
and max
.
public:
static System::SByte Clamp(System::SByte value, System::SByte min, System::SByte max);
[System.CLSCompliant(false)]
public static sbyte Clamp(sbyte value, sbyte min, sbyte max);
[<System.CLSCompliant(false)>]
static member Clamp : sbyte * sbyte * sbyte -> sbyte
Public Shared Function Clamp (value As SByte, min As SByte, max As SByte) As SByte
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Returns value
clamped to the inclusive range of min
and max
.
public:
static int Clamp(int value, int min, int max);
public static int Clamp(int value, int min, int max);
static member Clamp : int * int * int -> int
Public Shared Function Clamp (value As Integer, min As Integer, max As Integer) As Integer
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Returns value
clamped to the inclusive range of min
and max
.
public:
static long Clamp(long value, long min, long max);
public static long Clamp(long value, long min, long max);
static member Clamp : int64 * int64 * int64 -> int64
Public Shared Function Clamp (value As Long, min As Long, max As Long) As Long
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Returns value
clamped to the inclusive range of min
and max
.
public:
static short Clamp(short value, short min, short max);
public static short Clamp(short value, short min, short max);
static member Clamp : int16 * int16 * int16 -> int16
Public Shared Function Clamp (value As Short, min As Short, max As Short) As Short
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Returns value
clamped to the inclusive range of min
and max
.
public:
static double Clamp(double value, double min, double max);
public static double Clamp(double value, double min, double max);
static member Clamp : double * double * double -> double
Public Shared Function Clamp (value As Double, min As Double, max As Double) As Double
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
-or-
Exceptions Clamp(Decimal, Decimal, Decimal)Returns value
clamped to the inclusive range of min
and max
.
public:
static System::Decimal Clamp(System::Decimal value, System::Decimal min, System::Decimal max);
public static decimal Clamp(decimal value, decimal min, decimal max);
static member Clamp : decimal * decimal * decimal -> decimal
Public Shared Function Clamp (value As Decimal, min As Decimal, max As Decimal) As Decimal
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
<min
.
-or-
max
if max
< value
.
Returns value
clamped to the inclusive range of min
and max
.
public:
static System::Byte Clamp(System::Byte value, System::Byte min, System::Byte max);
public static byte Clamp(byte value, byte min, byte max);
static member Clamp : byte * byte * byte -> byte
Public Shared Function Clamp (value As Byte, min As Byte, max As Byte) As Byte
Parameters
The value to be clamped.
The lower bound of the result.
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Returns value
clamped to the inclusive range of min
and max
.
public:
static IntPtr Clamp(IntPtr value, IntPtr min, IntPtr max);
public static IntPtr Clamp(IntPtr value, IntPtr min, IntPtr max);
public static nint Clamp(nint value, nint min, nint max);
static member Clamp : nativeint * nativeint * nativeint -> nativeint
Public Shared Function Clamp (value As IntPtr, min As IntPtr, max As IntPtr) As IntPtr
Parameters
nint
nativeint
The value to be clamped.
nint
nativeint
The lower bound of the result.
nint
nativeint
The upper bound of the result.
Returnsvalue
if min
⤠value
⤠max
.
-or-
min
if value
< min
.
-or-
max
if max
< value
.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4