Changeset b9404c37bea45b8eb9394e9133ee491b6b8eb1b5

Show
Ignore:
Timestamp:
02/22/10 20:57:56 (5 months ago)
Author:
Tobias Bieniek <Tobias.Bieniek@…>
Parents:
6e014a2e320ed6aced93e064367bbe63b7d0a2ef
Children:
7f6214ec9e1584977d2073b7eb9ad14695fa8a17
git-committer:
Tobias Bieniek <Tobias.Bieniek@gmx.de> / 2010-02-22T18:57:56Z+0100
Message:

Units: Implemented ConvertUnits?() function

Location:
src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/Units.cpp

    r55fc40 rb9404c  
    689689 
    690690double 
     691Units::ConvertUnits(double Value, Units_t From, Units_t To) 
     692{ 
     693  return ToUserUnit(ToSysUnit(Value, From), To); 
     694} 
     695 
     696double 
    691697Units::ToUserUnit(double Value, Units_t Unit) 
    692698{ 
  • src/Units.hpp

    r6e014a rb9404c  
    305305 
    306306  /** 
     307   * Converts a Value from the given unit "From" to the given unit "To" 
     308   * @param Value The value in system unit 
     309   * @param From The source unit 
     310   * @param To The destination unit 
     311   * @return The value in user-specified unit 
     312   */ 
     313  static double ConvertUnits(double Value, Units_t From, Units_t To); 
     314 
     315  /** 
    307316   * Converts a Value from the system unit to the user-specified unit 
    308317   * @param Value The value in system unit