A value which is the min or max of multiple other values. More...
Public Types | |
| typedef TValue | Value |
| typedef TValue | Value |
Public Member Functions | |
| void | MaxWith (Value incoming_val) |
| Efficiently performs this->val = min(this->val, incoming_val). | |
| void | MaxWith (Value incoming_val) |
| Efficiently performs this->val = min(this->val, incoming_val). | |
| void | MinWith (Value incoming_val) |
| Efficiently performs this->val = min(this->val, incoming_val). | |
| void | MinWith (Value incoming_val) |
| Efficiently performs this->val = min(this->val, incoming_val). | |
| OBJECT_TRAVERSAL (MinMaxVal) | |
| OBJECT_TRAVERSAL (MinMaxVal) | |
| operator Value () const | |
| Converts implicitly to the value. | |
| operator Value () const | |
| Converts implicitly to the value. | |
| const Value & | operator= (Value val_in) |
| Sets the value. | |
| const Value & | operator= (Value val_in) |
| Sets the value. | |
Public Attributes | |
| Value | val |
| The underlying value. | |
A value which is the min or max of multiple other values.
Comes with a highly optimized version of x = max(x, y).
The template argument should be something like double, with greater-than, less-than, and equals operators.
Definition at line 189 of file math_lib.h.
| void MinMaxVal< TValue >::MaxWith | ( | Value | incoming_val | ) | [inline] |
Efficiently performs this->val = min(this->val, incoming_val).
The expectation is that it is higly unlikely for the incoming value to be the new maximum.
Definition at line 232 of file math_lib.h.
References MinMaxVal< TValue >::val.
| void MinMaxVal< TValue >::MaxWith | ( | Value | incoming_val | ) | [inline] |
Efficiently performs this->val = min(this->val, incoming_val).
The expectation is that it is higly unlikely for the incoming value to be the new maximum.
Definition at line 232 of file math_lib.h.
References MinMaxVal< TValue >::val.
| void MinMaxVal< TValue >::MinWith | ( | Value | incoming_val | ) | [inline] |
Efficiently performs this->val = min(this->val, incoming_val).
The expectation is that it is higly unlikely for the incoming value to be the new minimum.
Definition at line 220 of file math_lib.h.
References MinMaxVal< TValue >::val.
| void MinMaxVal< TValue >::MinWith | ( | Value | incoming_val | ) | [inline] |
Efficiently performs this->val = min(this->val, incoming_val).
The expectation is that it is higly unlikely for the incoming value to be the new minimum.
Definition at line 220 of file math_lib.h.
References MinMaxVal< TValue >::val.
| MinMaxVal< TValue >::operator Value | ( | ) | const [inline] |
Converts implicitly to the value.
Definition at line 205 of file math_lib.h.
References MinMaxVal< TValue >::val.
| MinMaxVal< TValue >::operator Value | ( | ) | const [inline] |
Converts implicitly to the value.
Definition at line 205 of file math_lib.h.
References MinMaxVal< TValue >::val.
| const Value& MinMaxVal< TValue >::operator= | ( | Value | val_in | ) | [inline] |
| const Value& MinMaxVal< TValue >::operator= | ( | Value | val_in | ) | [inline] |
The underlying value.
Definition at line 195 of file math_lib.h.
Referenced by MinMaxVal< TValue >::MaxWith(), MinMaxVal< TValue >::MinWith(), MinMaxVal< TValue >::operator Value(), and MinMaxVal< TValue >::operator=().
1.6.3