Go to the source code of this file.
|
| template<class T > |
| T | Min (T p_t1, T p_t2) |
| | [AI] Returns the minimum of two values. More...
|
| |
| template<class T > |
| T | Min (T p_t1, T p_t2, T p_t3) |
| | [AI] Returns the minimum of three values. More...
|
| |
| template<class T > |
| T | Max (T p_t1, T p_t2) |
| | [AI] Returns the maximum of two values. More...
|
| |
| template<class T > |
| T | Max (T p_t1, T p_t2, T p_t3) |
| | [AI] Returns the maximum of three values. More...
|
| |
| template<class T > |
| T | Abs (T p_t) |
| | [AI] Returns the absolute value. More...
|
| |
| template<class T > |
| void | Swap (T &p_t1, T &p_t2) |
| | [AI] Swaps the values of two variables of the same type. More...
|
| |
| template<class T > |
| T | DToR (T p_d) |
| | [AI] Converts degrees to radians. More...
|
| |
| template<class T > |
| T | RToD (T p_r) |
| | [AI] Converts radians to degrees. More...
|
| |
◆ Abs()
[AI] Returns the absolute value.
[AI] This computes the absolute value of the provided value by negating it if it is negative.
- Parameters
-
- Returns
- The absolute value of p_t. [AI]
Definition at line 64 of file legoutil.h.
◆ DToR()
[AI] Converts degrees to radians.
[AI] Useful for trigonometric functions which use radians. [AI]
- Parameters
-
| p_d | Angle in degrees. [AI] |
- Returns
- The angle in radians. [AI]
Definition at line 94 of file legoutil.h.
◆ Max() [1/2]
[AI] Returns the maximum of two values.
- Parameters
-
| p_t1 | First value to compare. [AI] |
| p_t2 | Second value to compare. [AI] |
- Returns
- The larger of p_t1 and p_t2. [AI]
Definition at line 39 of file legoutil.h.
◆ Max() [2/2]
template<class T >
| T Max |
( |
T |
p_t1, |
|
|
T |
p_t2, |
|
|
T |
p_t3 |
|
) |
| |
|
inline |
[AI] Returns the maximum of three values.
- Parameters
-
| p_t1 | First value to compare. [AI] |
| p_t2 | Second value to compare. [AI] |
| p_t3 | Third value to compare. [AI] |
- Returns
- The largest of the three values. [AI]
Definition at line 52 of file legoutil.h.
◆ Min() [1/2]
[AI] Returns the minimum of two values.
- Parameters
-
| p_t1 | First value to compare. [AI] |
| p_t2 | Second value to compare. [AI] |
- Returns
- The smaller of p_t1 and p_t2. [AI]
Definition at line 14 of file legoutil.h.
◆ Min() [2/2]
template<class T >
| T Min |
( |
T |
p_t1, |
|
|
T |
p_t2, |
|
|
T |
p_t3 |
|
) |
| |
|
inline |
[AI] Returns the minimum of three values.
- Parameters
-
| p_t1 | First value to compare. [AI] |
| p_t2 | Second value to compare. [AI] |
| p_t3 | Third value to compare. [AI] |
- Returns
- The smallest of the three values. [AI]
Definition at line 27 of file legoutil.h.
◆ RToD()
[AI] Converts radians to degrees.
[AI] Useful for conversion to a more human-friendly angle representation. [AI]
- Parameters
-
| p_r | Angle in radians. [AI] |
- Returns
- The angle in degrees. [AI]
Definition at line 106 of file legoutil.h.
◆ Swap()
template<class T >
| void Swap |
( |
T & |
p_t1, |
|
|
T & |
p_t2 |
|
) |
| |
|
inline |
[AI] Swaps the values of two variables of the same type.
- Parameters
-
| p_t1 | First variable to swap; value will be updated with the value of p_t2. [AI] |
| p_t2 | Second variable to swap; value will be updated with the value of p_t1. [AI] |
Definition at line 77 of file legoutil.h.