BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
BrawlLib.Internal.Int32Extension Class Reference

Static Public Member Functions

static int Reverse (this int value)
 
static int Align (this int value, int align)
 
static int Clamp (this int value, int min, int max)
 
static int ClampMin (this int value, int min)
 
static int RoundDownToEven (this int value)
 
static int RoundUpToEven (this int value)
 

Member Function Documentation

◆ Align()

static int BrawlLib.Internal.Int32Extension.Align ( this int  value,
int  align 
)
inlinestatic
11 {
12 if (align == 0)
13 {
14 return value;
15 }
16
17 return (value + align - 1) / align * align;
18 }

◆ Clamp()

static int BrawlLib.Internal.Int32Extension.Clamp ( this int  value,
int  min,
int  max 
)
inlinestatic
21 {
22 return value <= min ? min : value >= max ? max : value;
23 }

◆ ClampMin()

static int BrawlLib.Internal.Int32Extension.ClampMin ( this int  value,
int  min 
)
inlinestatic
26 {
27 return value <= min ? min : value;
28 }

◆ Reverse()

static int BrawlLib.Internal.Int32Extension.Reverse ( this int  value)
inlinestatic
6 {
7 return ((value >> 24) & 0xFF) | (value << 24) | ((value >> 8) & 0xFF00) | ((value & 0xFF00) << 8);
8 }

◆ RoundDownToEven()

static int BrawlLib.Internal.Int32Extension.RoundDownToEven ( this int  value)
inlinestatic
31 {
32 return value - value % 2;
33 }

◆ RoundUpToEven()

static int BrawlLib.Internal.Int32Extension.RoundUpToEven ( this int  value)
inlinestatic
36 {
37 return value + value % 2;
38 }

The documentation for this class was generated from the following file: