Math.Clamp Metoda
Definicja
Przeciążenia
Clamp(UInt64, UInt64, UInt64) |
Zwraca zamocowany |
Clamp(UInt32, UInt32, UInt32) |
Zwraca zamocowany |
Clamp(UInt16, UInt16, UInt16) |
Zwraca zamocowany |
Clamp(Single, Single, Single) |
Zwraca zamocowany |
Clamp(SByte, SByte, SByte) |
Zwraca zamocowany |
Clamp(Int32, Int32, Int32) |
Zwraca zamocowany |
Clamp(Int16, Int16, Int16) |
Zwraca zamocowany |
Clamp(Double, Double, Double) |
Zwraca zamocowany |
Clamp(Decimal, Decimal, Decimal) |
Zwraca zamocowany |
Clamp(Byte, Byte, Byte) |
Zwraca zamocowany |
Clamp(Int64, Int64, Int64) |
Zwraca zamocowany |
Clamp(UInt64, UInt64, UInt64)
Ważne
Ten interfejs API nie jest zgodny ze specyfikacją CLS.
Zwraca zamocowany value
do zakresu włącznie min
i max
.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);
public static ulong Clamp (ulong value, ulong min, ulong max);
[System.CLSCompliant(false)]
public static ulong Clamp (ulong value, ulong min, ulong max);
static member Clamp : uint64 * uint64 * uint64 -> uint64
[<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
Parametry
- value
- UInt64
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- UInt64
Dolna granica wyniku.The lower bound of the result.
- max
- UInt64
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
- Atrybuty
Dotyczy
Clamp(UInt32, UInt32, UInt32)
Ważne
Ten interfejs API nie jest zgodny ze specyfikacją CLS.
Zwraca zamocowany value
do zakresu włącznie min
i max
.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);
public static uint Clamp (uint value, uint min, uint max);
[System.CLSCompliant(false)]
public static uint Clamp (uint value, uint min, uint max);
static member Clamp : uint32 * uint32 * uint32 -> uint32
[<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
Parametry
- value
- UInt32
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- UInt32
Dolna granica wyniku.The lower bound of the result.
- max
- UInt32
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
- Atrybuty
Dotyczy
Clamp(UInt16, UInt16, UInt16)
Ważne
Ten interfejs API nie jest zgodny ze specyfikacją CLS.
Zwraca zamocowany value
do zakresu włącznie min
i max
.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);
public static ushort Clamp (ushort value, ushort min, ushort max);
[System.CLSCompliant(false)]
public static ushort Clamp (ushort value, ushort min, ushort max);
static member Clamp : uint16 * uint16 * uint16 -> uint16
[<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
Parametry
- value
- UInt16
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- UInt16
Dolna granica wyniku.The lower bound of the result.
- max
- UInt16
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
- Atrybuty
Dotyczy
Clamp(Single, Single, Single)
Zwraca zamocowany value
do zakresu włącznie min
i 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
Parametry
- value
- Single
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- Single
Dolna granica wyniku.The lower bound of the result.
- max
- Single
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
-lub--or-
NaN Jeśli value
jest równe NaN .NaN if value
equals NaN.
Dotyczy
Clamp(SByte, SByte, SByte)
Ważne
Ten interfejs API nie jest zgodny ze specyfikacją CLS.
Zwraca zamocowany value
do zakresu włącznie min
i max
.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);
public static sbyte Clamp (sbyte value, sbyte min, sbyte max);
[System.CLSCompliant(false)]
public static sbyte Clamp (sbyte value, sbyte min, sbyte max);
static member Clamp : sbyte * sbyte * sbyte -> sbyte
[<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
Parametry
- value
- SByte
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- SByte
Dolna granica wyniku.The lower bound of the result.
- max
- SByte
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
- Atrybuty
Dotyczy
Clamp(Int32, Int32, Int32)
Zwraca zamocowany value
do zakresu włącznie min
i max
.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
Parametry
- value
- Int32
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- Int32
Dolna granica wyniku.The lower bound of the result.
- max
- Int32
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
Dotyczy
Clamp(Int16, Int16, Int16)
Zwraca zamocowany value
do zakresu włącznie min
i max
.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
Parametry
- value
- Int16
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- Int16
Dolna granica wyniku.The lower bound of the result.
- max
- Int16
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
Dotyczy
Clamp(Double, Double, Double)
Zwraca zamocowany value
do zakresu włącznie min
i max
.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
Parametry
- value
- Double
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- Double
Dolna granica wyniku.The lower bound of the result.
- max
- Double
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
-lub--or-
NaN Jeśli value
jest równe NaN .NaN if value
equals NaN.
Dotyczy
Clamp(Decimal, Decimal, Decimal)
Zwraca zamocowany value
do zakresu włącznie min
i max
.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
Parametry
- value
- Decimal
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- Decimal
Dolna granica wyniku.The lower bound of the result.
- max
- Decimal
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
<min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
Dotyczy
Clamp(Byte, Byte, Byte)
Zwraca zamocowany value
do zakresu włącznie min
i max
.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
Parametry
- value
- Byte
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- Byte
Dolna granica wyniku.The lower bound of the result.
- max
- Byte
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.
Dotyczy
Clamp(Int64, Int64, Int64)
Zwraca zamocowany value
do zakresu włącznie min
i max
.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
Parametry
- value
- Int64
Wartość, która ma zostać zamocowana.The value to be clamped.
- min
- Int64
Dolna granica wyniku.The lower bound of the result.
- max
- Int64
Górna granica wyniku.The upper bound of the result.
Zwraca
value
Jeśli min
≤ value
≤ max
.value
if min
≤ value
≤ max
.
-lub--or-
min
Jeśli value
< min
.min
if value
< min
.
-lub--or-
max
Jeśli max
< value
.max
if max
< value
.