C# Class Nintenlord.Utility.IntegerExtensions

Extensions and helper methods to integers
Mostrar archivo Open project: Diegoisawesome/AwesomeMapEditor-old

Public Methods

Method Description
Clamp ( this i, int min, int max ) : int
Clamp ( int &i, int min, int max ) : void
Intersects ( int index1, int length1, int index2, int length2 ) : bool
IsInRange ( this i, int min, int max ) : bool
IsInRangeHO ( this i, int min, int max ) : bool
ToBinString ( this i, string postfix ) : string
ToBinString ( this i, string prefix, string postfix ) : string
ToHexString ( this i, string prefix ) : string
ToHexString ( this i, string prefix, string postfix ) : string
ToMod ( this i, int mod ) : int
ToMod ( int &i, int mod ) : void
ToPower2 ( this value ) : int
ToPower2 ( int &value ) : void

Method Details

Clamp() public static method

public static Clamp ( this i, int min, int max ) : int
i this
min int
max int
return int

Clamp() public static method

public static Clamp ( int &i, int min, int max ) : void
i int
min int
max int
return void

Intersects() public static method

public static Intersects ( int index1, int length1, int index2, int length2 ) : bool
index1 int
length1 int
index2 int
length2 int
return bool

IsInRange() public static method

public static IsInRange ( this i, int min, int max ) : bool
i this
min int
max int
return bool

IsInRangeHO() public static method

public static IsInRangeHO ( this i, int min, int max ) : bool
i this
min int
max int
return bool

ToBinString() public static method

public static ToBinString ( this i, string postfix ) : string
i this
postfix string
return string

ToBinString() public static method

public static ToBinString ( this i, string prefix, string postfix ) : string
i this
prefix string
postfix string
return string

ToHexString() public static method

public static ToHexString ( this i, string prefix ) : string
i this
prefix string
return string

ToHexString() public static method

public static ToHexString ( this i, string prefix, string postfix ) : string
i this
prefix string
postfix string
return string

ToMod() public static method

public static ToMod ( this i, int mod ) : int
i this
mod int
return int

ToMod() public static method

public static ToMod ( int &i, int mod ) : void
i int
mod int
return void

ToPower2() public static method

public static ToPower2 ( this value ) : int
value this
return int

ToPower2() public static method

public static ToPower2 ( int &value ) : void
value int
return void