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

Static Public Member Functions

static uint Reverse (this uint value)
 
static uint Align (this uint value, uint align)
 
static uint Clamp (this uint value, uint min, uint max)
 

Member Function Documentation

◆ Align()

static uint BrawlLib.Internal.UInt32Extension.Align ( this uint  value,
uint  align 
)
inlinestatic
11 {
12 if (align <= 1)
13 {
14 return value;
15 }
16
17 uint temp = value % align;
18 if (temp != 0)
19 {
20 value += align - temp;
21 }
22
23 return value;
24 }

◆ Clamp()

static uint BrawlLib.Internal.UInt32Extension.Clamp ( this uint  value,
uint  min,
uint  max 
)
inlinestatic
27 {
28 return value < min ? min : value > max ? max : value;
29 }

◆ Reverse()

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

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