mcs::units Namespace Reference


Classes

struct  static_abs
 compile time absolute value More...
class  static_rational
 compile time rational number More...
struct  static_negate< static_rational< N, D > >
 negate rational number More...
struct  static_add< static_rational< N1, D1 >, static_rational< N2, D2 > >
 add rational numbers More...
struct  static_subtract< static_rational< N1, D1 >, static_rational< N2, D2 > >
 subtract rational numbers More...
struct  static_multiply< static_rational< N1, D1 >, static_rational< N2, D2 > >
 multiply rational numbers More...
struct  static_divide< static_rational< N1, D1 >, static_rational< N2, D2 > >
 divide rational numbers More...

Typedefs

typedef long integer_type

Functions

template<class T, integer_type N, integer_type D>
value (const static_rational< N, D > &r)


Typedef Documentation

typedef long mcs::units::integer_type

Definition at line 42 of file static_rational.hpp.


Function Documentation

template<class T, integer_type N, integer_type D>
T mcs::units::value ( const static_rational< N, D > &  r  ) 

Definition at line 114 of file static_rational.hpp.

References physical::unitsymbol_si_float::T.

Referenced by BOOST_AUTO_UNIT_TEST().

00115 {
00116         //return T(r.numerator())/T(r.denominator());
00117         return T(N)/T(D);
00118 }


Generated on Mon Apr 2 22:25:07 2007 for physical_svn by  doxygen 1.5.1-p1
hosted on SourceForge.net Logo