C# Class RampUp.Util

Afficher le fichier Open project: Scooletz/RampUp

Méthodes publiques

Méthode 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

Méthode Description
IsPowerOfTwo ( this n ) : bool
Kilobytes ( this value ) : int
Log2 ( this i ) : int
Megabytes ( this value ) : int

Method Details

AlignToMultipleOf() public static méthode

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
Résultat int

AlignToMultipleOf() public static méthode

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
Résultat long