C# Class ux.Utils.ValueTypeEx

拡張メソッドを集めたクラスです。
Show file Open project: nanase/ux

Public Methods

Method Description
Clamp ( this value, double max ) : double

Double 値を 0.0 から指定された数値の範囲でクランプします。

Clamp ( this value, double max, double min ) : double

Double 値を 0.0 から指定された数値の範囲でクランプします。

Clamp ( this value, float max ) : float

Single 値を 0.0 から指定された数値の範囲でクランプします。

Clamp ( this value, float max, float min ) : float

Single 値を 0.0 から指定された数値の範囲でクランプします。

Clamp ( this value, int max ) : int

Int32 値を 0 から指定された数値の範囲でクランプします。

Clamp ( this value, int max, int min ) : int

Int32 値を 0.0 から指定された数値の範囲でクランプします。

Clamp ( this value, short max ) : short

Int16 値を 0 から指定された数値の範囲でクランプします。

Clamp ( this value, short max, short min ) : short

Int16 値を 0.0 から指定された数値の範囲でクランプします。

ToInt32 ( this value ) : int

float 値を単純に Int32 値に変換します。

ToInt32 ( this value, int max ) : int

float 値を 0 から指定された数値の範囲で Int32 値に変換します。

ToInt32 ( this value, int max, int min ) : int

float 値を指定された数値の範囲で Int32 値に変換します。

Method Details

Clamp() public static method

Double 値を 0.0 から指定された数値の範囲でクランプします。
public static Clamp ( this value, double max ) : double
value this クランプされる値。
max double 範囲の最大値。
return double

Clamp() public static method

Double 値を 0.0 から指定された数値の範囲でクランプします。
public static Clamp ( this value, double max, double min ) : double
value this クランプされる値。
max double 範囲の最大値。
min double 範囲の最小値。
return double

Clamp() public static method

Single 値を 0.0 から指定された数値の範囲でクランプします。
public static Clamp ( this value, float max ) : float
value this クランプされる値。
max float 範囲の最大値。
return float

Clamp() public static method

Single 値を 0.0 から指定された数値の範囲でクランプします。
public static Clamp ( this value, float max, float min ) : float
value this クランプされる値。
max float 範囲の最大値。
min float 範囲の最小値。
return float

Clamp() public static method

Int32 値を 0 から指定された数値の範囲でクランプします。
public static Clamp ( this value, int max ) : int
value this クランプされる値。
max int 範囲の最大値。
return int

Clamp() public static method

Int32 値を 0.0 から指定された数値の範囲でクランプします。
public static Clamp ( this value, int max, int min ) : int
value this クランプされる値。
max int 範囲の最大値。
min int 範囲の最小値。
return int

Clamp() public static method

Int16 値を 0 から指定された数値の範囲でクランプします。
public static Clamp ( this value, short max ) : short
value this クランプされる値。
max short 範囲の最大値。
return short

Clamp() public static method

Int16 値を 0.0 から指定された数値の範囲でクランプします。
public static Clamp ( this value, short max, short min ) : short
value this クランプされる値。
max short 範囲の最大値。
min short 範囲の最小値。
return short

ToInt32() public static method

float 値を単純に Int32 値に変換します。
public static ToInt32 ( this value ) : int
value this 変換される float 値。
return int

ToInt32() public static method

float 値を 0 から指定された数値の範囲で Int32 値に変換します。
public static ToInt32 ( this value, int max ) : int
value this 変換される float 値。
max int 変換の上限となる 最大値。
return int

ToInt32() public static method

float 値を指定された数値の範囲で Int32 値に変換します。
public static ToInt32 ( this value, int max, int min ) : int
value this 変換される float 値。
max int 変換の上限となる 最大値。
min int 変換の下限となる 最小値。
return int