Isle
Loading...
Searching...
No Matches
legoutil.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<class T >
Min (T p_t1, T p_t2)
 [AI] Returns the minimum of two values. More...
 
template<class T >
Min (T p_t1, T p_t2, T p_t3)
 [AI] Returns the minimum of three values. More...
 
template<class T >
Max (T p_t1, T p_t2)
 [AI] Returns the maximum of two values. More...
 
template<class T >
Max (T p_t1, T p_t2, T p_t3)
 [AI] Returns the maximum of three values. More...
 
template<class 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 >
DToR (T p_d)
 [AI] Converts degrees to radians. More...
 
template<class T >
RToD (T p_r)
 [AI] Converts radians to degrees. More...
 

Function Documentation

◆ Abs()

template<class T >
T Abs ( p_t)
inline

[AI] Returns the absolute value.

[AI] This computes the absolute value of the provided value by negating it if it is negative.

Parameters
p_tInput value. [AI]
Returns
The absolute value of p_t. [AI]

Definition at line 64 of file legoutil.h.

◆ DToR()

template<class T >
T DToR ( p_d)
inline

[AI] Converts degrees to radians.

[AI] Useful for trigonometric functions which use radians. [AI]

Parameters
p_dAngle in degrees. [AI]
Returns
The angle in radians. [AI]

Definition at line 94 of file legoutil.h.

◆ Max() [1/2]

template<class T >
T Max ( p_t1,
p_t2 
)
inline

[AI] Returns the maximum of two values.

Parameters
p_t1First value to compare. [AI]
p_t2Second 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 ( p_t1,
p_t2,
p_t3 
)
inline

[AI] Returns the maximum of three values.

Parameters
p_t1First value to compare. [AI]
p_t2Second value to compare. [AI]
p_t3Third value to compare. [AI]
Returns
The largest of the three values. [AI]

Definition at line 52 of file legoutil.h.

◆ Min() [1/2]

template<class T >
T Min ( p_t1,
p_t2 
)
inline

[AI] Returns the minimum of two values.

Parameters
p_t1First value to compare. [AI]
p_t2Second 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 ( p_t1,
p_t2,
p_t3 
)
inline

[AI] Returns the minimum of three values.

Parameters
p_t1First value to compare. [AI]
p_t2Second value to compare. [AI]
p_t3Third value to compare. [AI]
Returns
The smallest of the three values. [AI]

Definition at line 27 of file legoutil.h.

◆ RToD()

template<class T >
T RToD ( p_r)
inline

[AI] Converts radians to degrees.

[AI] Useful for conversion to a more human-friendly angle representation. [AI]

Parameters
p_rAngle 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_t1First variable to swap; value will be updated with the value of p_t2. [AI]
p_t2Second variable to swap; value will be updated with the value of p_t1. [AI]

Definition at line 77 of file legoutil.h.