Changeset 21006

Show
Ignore:
Timestamp:
01/16/08 18:43:28 (8 months ago)
Author:
patrick
Message:

Fixed misuse of gmtl::Math::clamp<T>().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/gadgeteer/gadget/Type/Analog.cpp

    r20974 r21006  
    235235float Analog::normalize(const float rawData) const 
    236236{ 
    237    float value(rawData); 
    238  
    239    // First, clamp the value so that min <= value <= max. 
     237   // First, clamp the raw data so that min <= value <= max. 
    240238   const float min_value(getMin()); 
    241239   const float max_value(getMax()); 
    242    gmtl::Math::clamp(value, min_value, max_value); 
     240   const float value(gmtl::Math::clamp(rawData, min_value, max_value)); 
    243241 
    244242   // Slide everything to 0.0 (subtract all by min_value), and then divide