#include <vectorMath.h>
Public Member Functions | ||||
| unit | start () const | |||
| ||||
| unit | end () const | |||
| ||||
| void | start (const unit f) | |||
| ||||
| void | end (const unit f) | |||
| ||||
| bool | in_range (const unit f) | |||
| Is the number between the start and end (min and max) values? | ||||
| bool | is_empty () | |||
| Has a range been set? | ||||
| unit | clamp (const unit f) const | |||
| Return the value clamped to the current min/max. | ||||
Create methods | ||||
| CRangeType () | ||||
| CRangeType (const unit start, const unit end=0.0) | ||||
Set/Reset methods | ||||
| void | set (const unit start, const unit end) | |||
| Set start and end values. | ||||
| void | reset () | |||
| Reset the range end points. | ||||
(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.
| void CRangeType::set | ( | const unit | start, | |
| const unit | end | |||
| ) | [inline] |
Set start and end values.
| start | Starting value. | |
| end | Ending value. |
| bool CRangeType::in_range | ( | const unit | f | ) | [inline] |
Is the number between the start and end (min and max) values?
| f | Number being tested |
< if no range is set, always return true
| bool CRangeType::is_empty | ( | ) | [inline] |
Has a range been set?
| unit CRangeType::clamp | ( | const unit | f | ) | const [inline] |
Return the value clamped to the current min/max.
| f | Number being clamped |
1.5.4