Math.Clamp Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Überlädt
| Clamp(UIntPtr, UIntPtr, UIntPtr) |
Gibt |
| Clamp(UInt64, UInt64, UInt64) |
Gibt |
| Clamp(UInt32, UInt32, UInt32) |
Gibt |
| Clamp(UInt16, UInt16, UInt16) |
Gibt |
| Clamp(Single, Single, Single) |
Gibt |
| Clamp(SByte, SByte, SByte) |
Gibt |
| Clamp(Int64, Int64, Int64) |
Gibt |
| Clamp(Int32, Int32, Int32) |
Gibt |
| Clamp(Int16, Int16, Int16) |
Gibt |
| Clamp(Double, Double, Double) |
Gibt |
| Clamp(Decimal, Decimal, Decimal) |
Gibt |
| Clamp(Byte, Byte, Byte) |
Gibt |
| Clamp(IntPtr, IntPtr, IntPtr) |
Gibt |
Clamp(UIntPtr, UIntPtr, UIntPtr)
Wichtig
Diese API ist nicht CLS-kompatibel.
Gibt value gebunden an den Inklusivbereich von min und max zurück.
public:
static UIntPtr Clamp(UIntPtr value, UIntPtr min, UIntPtr max);
[System.CLSCompliant(false)]
public static UIntPtr Clamp (UIntPtr value, UIntPtr min, UIntPtr max);
public static UIntPtr Clamp (UIntPtr value, UIntPtr min, UIntPtr max);
[<System.CLSCompliant(false)>]
static member Clamp : unativeint * unativeint * unativeint -> unativeint
static member Clamp : unativeint * unativeint * unativeint -> unativeint
Public Shared Function Clamp (value As UIntPtr, min As UIntPtr, max As UIntPtr) As UIntPtr
Parameter
- value
-
UIntPtr
unativeint
Der zu bindende Wert.
- min
-
UIntPtr
unativeint
Die Untergrenze des Ergebnisses.
- max
-
UIntPtr
unativeint
Die Obergrenze des Ergebnisses.
Gibt zurück
-
UIntPtr
unativeint
value wenn min ≤ value ≤ max.
Oder: min , wenn value < min .
Oder: max , wenn max < value .
- Attribute
Gilt für:
Clamp(UInt64, UInt64, UInt64)
Wichtig
Diese API ist nicht CLS-kompatibel.
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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);
public static ulong Clamp (ulong value, ulong min, ulong max);
[<System.CLSCompliant(false)>]
static member Clamp : uint64 * uint64 * uint64 -> uint64
static member Clamp : uint64 * uint64 * uint64 -> uint64
Public Shared Function Clamp (value As ULong, min As ULong, max As ULong) As ULong
Parameter
- value
- UInt64
Der zu bindende Wert.
- min
- UInt64
Die Untergrenze des Ergebnisses.
- max
- UInt64
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
- Attribute
Gilt für:
Clamp(UInt32, UInt32, UInt32)
Wichtig
Diese API ist nicht CLS-kompatibel.
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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);
public static uint Clamp (uint value, uint min, uint max);
[<System.CLSCompliant(false)>]
static member Clamp : uint32 * uint32 * uint32 -> uint32
static member Clamp : uint32 * uint32 * uint32 -> uint32
Public Shared Function Clamp (value As UInteger, min As UInteger, max As UInteger) As UInteger
Parameter
- value
- UInt32
Der zu bindende Wert.
- min
- UInt32
Die Untergrenze des Ergebnisses.
- max
- UInt32
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
- Attribute
Gilt für:
Clamp(UInt16, UInt16, UInt16)
Wichtig
Diese API ist nicht CLS-kompatibel.
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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);
public static ushort Clamp (ushort value, ushort min, ushort max);
[<System.CLSCompliant(false)>]
static member Clamp : uint16 * uint16 * uint16 -> uint16
static member Clamp : uint16 * uint16 * uint16 -> uint16
Public Shared Function Clamp (value As UShort, min As UShort, max As UShort) As UShort
Parameter
- value
- UInt16
Der zu bindende Wert.
- min
- UInt16
Die Untergrenze des Ergebnisses.
- max
- UInt16
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
- Attribute
Gilt für:
Clamp(Single, Single, Single)
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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
Parameter
- value
- Single
Der zu bindende Wert.
- min
- Single
Die Untergrenze des Ergebnisses.
- max
- Single
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
- oder -
NaN wenn value gleich NaN.
Gilt für:
Clamp(SByte, SByte, SByte)
Wichtig
Diese API ist nicht CLS-kompatibel.
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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);
public static sbyte Clamp (sbyte value, sbyte min, sbyte max);
[<System.CLSCompliant(false)>]
static member Clamp : sbyte * sbyte * sbyte -> sbyte
static member Clamp : sbyte * sbyte * sbyte -> sbyte
Public Shared Function Clamp (value As SByte, min As SByte, max As SByte) As SByte
Parameter
- value
- SByte
Der zu bindende Wert.
- min
- SByte
Die Untergrenze des Ergebnisses.
- max
- SByte
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
- Attribute
Gilt für:
Clamp(Int64, Int64, Int64)
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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
Parameter
- value
- Int64
Der zu bindende Wert.
- min
- Int64
Die Untergrenze des Ergebnisses.
- max
- Int64
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
Gilt für:
Clamp(Int32, Int32, Int32)
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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
Parameter
- value
- Int32
Der zu bindende Wert.
- min
- Int32
Die Untergrenze des Ergebnisses.
- max
- Int32
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
Gilt für:
Clamp(Int16, Int16, Int16)
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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
Parameter
- value
- Int16
Der zu bindende Wert.
- min
- Int16
Die Untergrenze des Ergebnisses.
- max
- Int16
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
Gilt für:
Clamp(Double, Double, Double)
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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
Parameter
- value
- Double
Der zu bindende Wert.
- min
- Double
Die Untergrenze des Ergebnisses.
- max
- Double
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
- oder -
NaN wenn value gleich NaN.
Gilt für:
Clamp(Decimal, Decimal, Decimal)
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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
Parameter
- value
- Decimal
Der zu bindende Wert.
- min
- Decimal
Die Untergrenze des Ergebnisses.
- max
- Decimal
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
Gilt für:
Clamp(Byte, Byte, Byte)
Gibt value gebunden an den Inklusivbereich von min und max zurück.
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
Parameter
- value
- Byte
Der zu bindende Wert.
- min
- Byte
Die Untergrenze des Ergebnisses.
- max
- Byte
Die Obergrenze des Ergebnisses.
Gibt zurück
value wenn min ≤ value ≤ max.
- oder -
min wenn value < min.
- oder -
max wenn max < value.
Gilt für:
Clamp(IntPtr, IntPtr, IntPtr)
Gibt value gebunden an den Inklusivbereich von min und max zurück.
public:
static IntPtr Clamp(IntPtr value, IntPtr min, IntPtr max);
public static IntPtr Clamp (IntPtr value, IntPtr min, IntPtr max);
static member Clamp : nativeint * nativeint * nativeint -> nativeint
Public Shared Function Clamp (value As IntPtr, min As IntPtr, max As IntPtr) As IntPtr
Parameter
- value
-
IntPtr
nativeint
Der zu bindende Wert.
- min
-
IntPtr
nativeint
Die Untergrenze des Ergebnisses.
- max
-
IntPtr
nativeint
Die Obergrenze des Ergebnisses.
Gibt zurück
-
IntPtr
nativeint
value wenn min ≤ value ≤ max.
Oder: min , wenn value < min .
Oder: max , wenn max < value .