Definition at line 1 of file MathEx.cs.
◆ ClampToInt() [1/2]
| static int MathEx.ClampToInt |
( |
long |
a | ) |
|
|
inlinestatic |
◆ ClampToInt() [2/2]
| static int MathEx.ClampToInt |
( |
long |
a, |
|
|
int |
b = int::MaxValue |
|
) |
| |
|
inlinestatic |
Definition at line 29 of file MathEx.cs.
30 {
31 if (a > b)
32 {
33 return b;
34 }
35 if (a < -b)
36 {
37 return -b;
38 }
39 return (int)a;
40 }
◆ IsSameSign()
| static bool MathEx.IsSameSign |
( |
int |
a, |
|
|
int |
b |
|
) |
| |
|
inlinestatic |
Definition at line 3 of file MathEx.cs.
4 {
5 if (a < 0 || b < 0)
6 {
7 if (a < 0)
8 {
9 return b < 0;
10 }
11 return false;
12 }
13 return true;
14 }
Referenced by ActEffect.Proc().
◆ Max()
| static long MathEx.Max |
( |
long |
a, |
|
|
long |
b |
|
) |
| |
|
inlinestatic |
The documentation for this class was generated from the following file: