C# Class RampUp.Util

Mostrar archivo Open project: Scooletz/RampUp

Public Methods

Method Description
AlignToMultipleOf ( this value, int alignment ) : int

Aligns value to the next multiple of alignment. If the value equals an alignment multiple then it's returned without changes.

No branching :D

AlignToMultipleOf ( this value, long alignment ) : long

Aligns value to the next multiple of alignment. If the value equals an alignment multiple then it's returned without changes.

No branching :D

Private Methods

Method Description
IsPowerOfTwo ( this n ) : bool
Kilobytes ( this value ) : int
Log2 ( this i ) : int
Megabytes ( this value ) : int

Method Details

AlignToMultipleOf() public static method

Aligns value to the next multiple of alignment. If the value equals an alignment multiple then it's returned without changes.
No branching :D
public static AlignToMultipleOf ( this value, int alignment ) : int
value this
alignment int
return int

AlignToMultipleOf() public static method

Aligns value to the next multiple of alignment. If the value equals an alignment multiple then it's returned without changes.
No branching :D
public static AlignToMultipleOf ( this value, long alignment ) : long
value this
alignment long
return long