Math.Clamp Methode

Definitie

Overloads

Name Description
Clamp(Single, Single, Single)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(UIntPtr, UIntPtr, UIntPtr)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(UInt64, UInt64, UInt64)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(UInt32, UInt32, UInt32)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(UInt16, UInt16, UInt16)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(SByte, SByte, SByte)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(Int32, Int32, Int32)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(Int64, Int64, Int64)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(Int16, Int16, Int16)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(Double, Double, Double)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(Decimal, Decimal, Decimal)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(Byte, Byte, Byte)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(IntPtr, IntPtr, IntPtr)

Retourneert value vastgeklemd aan het inclusieve bereik van min en max.

Clamp(Single, Single, Single)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
Single

De waarde die moet worden begrensd.

min
Single

De ondergrens van het resultaat.

max
Single

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

– of –

NaN als value gelijk is NaNaan .

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(UIntPtr, UIntPtr, UIntPtr)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Belangrijk

Deze API is niet CLS-conform.

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
UIntPtr

nuint

unativeint

De waarde die moet worden begrensd.

min
UIntPtr

nuint

unativeint

De ondergrens van het resultaat.

max
UIntPtr

nuint

unativeint

De bovengrens van het resultaat.

Retouren

UIntPtr

unativeint

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Kenmerken

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(UInt64, UInt64, UInt64)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Belangrijk

Deze API is niet CLS-conform.

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
UInt64

De waarde die moet worden begrensd.

min
UInt64

De ondergrens van het resultaat.

max
UInt64

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Kenmerken

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(UInt32, UInt32, UInt32)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Belangrijk

Deze API is niet CLS-conform.

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
UInt32

De waarde die moet worden begrensd.

min
UInt32

De ondergrens van het resultaat.

max
UInt32

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Kenmerken

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(UInt16, UInt16, UInt16)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Belangrijk

Deze API is niet CLS-conform.

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
UInt16

De waarde die moet worden begrensd.

min
UInt16

De ondergrens van het resultaat.

max
UInt16

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Kenmerken

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(SByte, SByte, SByte)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Belangrijk

Deze API is niet CLS-conform.

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
SByte

De waarde die moet worden begrensd.

min
SByte

De ondergrens van het resultaat.

max
SByte

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Kenmerken

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(Int32, Int32, Int32)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
Int32

De waarde die moet worden begrensd.

min
Int32

De ondergrens van het resultaat.

max
Int32

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(Int64, Int64, Int64)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
Int64

De waarde die moet worden begrensd.

min
Int64

De ondergrens van het resultaat.

max
Int64

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(Int16, Int16, Int16)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
Int16

De waarde die moet worden begrensd.

min
Int16

De ondergrens van het resultaat.

max
Int16

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(Double, Double, Double)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
Double

De waarde die moet worden begrensd.

min
Double

De ondergrens van het resultaat.

max
Double

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

– of –

NaN als value gelijk is NaNaan .

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(Decimal, Decimal, Decimal)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
Decimal

De waarde die moet worden begrensd.

min
Decimal

De ondergrens van het resultaat.

max
Decimal

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(Byte, Byte, Byte)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
Byte

De waarde die moet worden begrensd.

min
Byte

De ondergrens van het resultaat.

max
Byte

De bovengrens van het resultaat.

Retouren

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Uitzonderingen

max is kleiner dan min.

Van toepassing op

Clamp(IntPtr, IntPtr, IntPtr)

Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs
Bron:
Math.cs

Retourneert value vastgeklemd aan het inclusieve bereik van min en 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

value
IntPtr

nint

nativeint

De waarde die moet worden begrensd.

min
IntPtr

nint

nativeint

De ondergrens van het resultaat.

max
IntPtr

nint

nativeint

De bovengrens van het resultaat.

Retouren

IntPtr

nativeint

value als minvaluemax.

– of –

min als value<min.

– of –

max als max<value.

Uitzonderingen

max is kleiner dan min.

Van toepassing op