次の方法で共有


Math.Clamp メソッド

定義

オーバーロード

Clamp(Single, Single, Single)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(UIntPtr, UIntPtr, UIntPtr)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(UInt64, UInt64, UInt64)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(UInt32, UInt32, UInt32)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(UInt16, UInt16, UInt16)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(SByte, SByte, SByte)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(Int32, Int32, Int32)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(Int64, Int64, Int64)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(Int16, Int16, Int16)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(Double, Double, Double)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(Decimal, Decimal, Decimal)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(Byte, Byte, Byte)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(IntPtr, IntPtr, IntPtr)

minmaxの包括的な範囲にクランプされた value を返します。

Clamp(Single, Single, Single)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
Single

クランプする値。

min
Single

結果の下限。

max
Single

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

-又は-

valueNaNと等しい場合に NaN します。

適用対象

Clamp(UIntPtr, UIntPtr, UIntPtr)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

重要

この API は CLS 準拠ではありません。

minmaxの包括的な範囲にクランプされた value を返します。

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)]
public static UIntPtr Clamp (UIntPtr value, UIntPtr min, UIntPtr 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

パラメーター

value
UIntPtr

nuint

unativeint

クランプする値。

min
UIntPtr

nuint

unativeint

結果の下限。

max
UIntPtr

nuint

unativeint

結果の上限。

戻り値

UIntPtr

nuint

unativeint

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

属性

適用対象

Clamp(UInt64, UInt64, UInt64)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

重要

この API は CLS 準拠ではありません。

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
UInt64

クランプする値。

min
UInt64

結果の下限。

max
UInt64

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

属性

適用対象

Clamp(UInt32, UInt32, UInt32)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

重要

この API は CLS 準拠ではありません。

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
UInt32

クランプする値。

min
UInt32

結果の下限。

max
UInt32

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

属性

適用対象

Clamp(UInt16, UInt16, UInt16)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

重要

この API は CLS 準拠ではありません。

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
UInt16

クランプする値。

min
UInt16

結果の下限。

max
UInt16

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

属性

適用対象

Clamp(SByte, SByte, SByte)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

重要

この API は CLS 準拠ではありません。

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
SByte

クランプする値。

min
SByte

結果の下限。

max
SByte

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

属性

適用対象

Clamp(Int32, Int32, Int32)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
Int32

クランプする値。

min
Int32

結果の下限。

max
Int32

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

適用対象

Clamp(Int64, Int64, Int64)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
Int64

クランプする値。

min
Int64

結果の下限。

max
Int64

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

適用対象

Clamp(Int16, Int16, Int16)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
Int16

クランプする値。

min
Int16

結果の下限。

max
Int16

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

適用対象

Clamp(Double, Double, Double)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
Double

クランプする値。

min
Double

結果の下限。

max
Double

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

-又は-

valueNaNと等しい場合に NaN します。

適用対象

Clamp(Decimal, Decimal, Decimal)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
Decimal

クランプする値。

min
Decimal

結果の下限。

max
Decimal

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

適用対象

Clamp(Byte, Byte, Byte)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

minmaxの包括的な範囲にクランプされた value を返します。

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

パラメーター

value
Byte

クランプする値。

min
Byte

結果の下限。

max
Byte

結果の上限。

戻り値

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

適用対象

Clamp(IntPtr, IntPtr, IntPtr)

ソース:
Math.cs
ソース:
Math.cs
ソース:
Math.cs

minmaxの包括的な範囲にクランプされた value を返します。

public:
 static IntPtr Clamp(IntPtr value, IntPtr min, IntPtr max);
public static nint Clamp (nint value, nint min, nint 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

パラメーター

value
IntPtr

nint

nativeint

クランプする値。

min
IntPtr

nint

nativeint

結果の下限。

max
IntPtr

nint

nativeint

結果の上限。

戻り値

IntPtr

nint

nativeint

minvaluemax場合は value します。

-又は-

value < min場合は min します。

-又は-

max < value場合は max します。

適用対象