CRangeType Class Reference

Store a range A pair of numbers storing the start/end values. More...

#include <vectorMath.h>

List of all members.

Public Member Functions

unit start () const
 
Returns:
Starting value.

unit end () const
 
Returns:
Ending value.

void start (const unit f)
 
Parameters:
f New starting value.

void end (const unit f)
 
Parameters:
f New ending value.

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.


Detailed Description

Store a range A pair of numbers storing the start/end values.

(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.

Author:
Doug Poston
Version:
1.3
Date:
12/28/2007

Member Function Documentation

void CRangeType::set ( const unit  start,
const unit  end 
) [inline]

Set start and end values.

Parameters:
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?

Parameters:
f Number being tested
Returns:
true if between the numbers (including end points) or there is no range set

< if no range is set, always return true

bool CRangeType::is_empty (  )  [inline]

Has a range been set?

Returns:
true if no value has been set yet (or the range has been reset)

unit CRangeType::clamp ( const unit  f  )  const [inline]

Return the value clamped to the current min/max.

Parameters:
f Number being clamped
Returns:
f if f is between start and end, otherwise return the value of the closest end


The documentation for this class was generated from the following file:
Generated on Fri Dec 28 12:55:07 2007 for template7 by  doxygen 1.5.4