◆ 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:
- BrawlLib/Internal/Int32Extension.cs