Bagikan melalui


NFloat.Clamp(NFloat, NFloat, NFloat) Metode

Definisi

Menjepit nilai ke nilai minimum dan maksimum inklusif.

public:
 static System::Runtime::InteropServices::NFloat Clamp(System::Runtime::InteropServices::NFloat value, System::Runtime::InteropServices::NFloat min, System::Runtime::InteropServices::NFloat max) = System::Numerics::INumber<System::Runtime::InteropServices::NFloat>::Clamp;
public static System.Runtime.InteropServices.NFloat Clamp (System.Runtime.InteropServices.NFloat value, System.Runtime.InteropServices.NFloat min, System.Runtime.InteropServices.NFloat max);
static member Clamp : System.Runtime.InteropServices.NFloat * System.Runtime.InteropServices.NFloat * System.Runtime.InteropServices.NFloat -> System.Runtime.InteropServices.NFloat
Public Shared Function Clamp (value As NFloat, min As NFloat, max As NFloat) As NFloat

Parameter

value
NFloat

Nilai untuk menjepit.

min
NFloat

Minimum inklusif yang value harus menjepit.

max
NFloat

Maksimum inklusif yang value harus menjepit.

Mengembalikan

Hasil penjepitan value ke rentang min inklusif dan max.

Penerapan

Berlaku untuk