Utility class for Physics2D.
More...
List of all members.
Static Public Member Functions |
| static uint | UnpackIdx1 (uint val) |
| | Get one of the pair index, totalIndex -> index1.
|
| static uint | UnpackIdx2 (uint val) |
| | Get one of the pair index, totalIndex -> index2.
|
| static uint | PackIdx (uint val1, uint val2) |
| | Pack two indices to one index by shifting and summing.
|
| static uint | SwapIdx (uint val) |
| | Swap index1 and index2.
|
| static float | GetRadian (float angle) |
| | angle in degree -> radian conversion
|
| static float | GetRadianMod (float angle) |
| | angle-> rearranged to [-Pi, Pi] conversion
|
Public Attributes |
|
const float | Pi = 3.14159265f |
| | Internal Pi used for Physics2D simulation.
|
|
const float | FltMax = 1E+37f |
| | Internal FltMax used for Physics2D simulation.
|
Detailed Description
Utility class for Physics2D.
Member Function Documentation
| static float GetRadian |
( |
float |
angle | ) |
[static] |
angle in degree -> radian conversion
- Parameters:
-
| angle | given angle in degree |
| static float GetRadianMod |
( |
float |
angle | ) |
[static] |
angle-> rearranged to [-Pi, Pi] conversion
- Parameters:
-
| angle | given angle in radian |
| static uint PackIdx |
( |
uint |
val1, |
|
|
uint |
val2 |
|
) |
| [static] |
Pack two indices to one index by shifting and summing.
- Parameters:
-
| val1 | given first index |
| val2 | given second index |
- Returns:
- totalIndex
| static uint SwapIdx |
( |
uint |
val | ) |
[static] |
Swap index1 and index2.
- Parameters:
-
- Returns:
- totalIndex by swapping
| static uint UnpackIdx1 |
( |
uint |
val | ) |
[static] |
Get one of the pair index, totalIndex -> index1.
- Parameters:
-
- Returns:
- index1
| static uint UnpackIdx2 |
( |
uint |
val | ) |
[static] |
Get one of the pair index, totalIndex -> index2.
- Parameters:
-
- Returns:
- index2