00001 00002 /*============================================================================= 00003 physical quantities / units / constants 00004 Copyright (c) 2006, 2007 Martin Schulz 00005 http://physical.sourceforge.net 00006 00007 This is private code by Martin Schulz. 00008 00009 Use, modification and distribution is subject to the Boost Software 00010 License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 00011 http://www.boost.org/LICENSE_1_0.txt) 00012 =============================================================================*/ 00013 00014 #ifndef PHYSICAL_DYNAMICSCALE 00015 #define PHYSICAL_DYNAMICSCALE 00016 00017 namespace physical { 00018 00019 namespace detail { 00020 00021 struct DynamicScale { 00022 double factor; 00023 double origin; 00024 00025 // C'tors 00026 DynamicScale(): factor(1.), origin(0.) {}; 00027 DynamicScale(double f): factor(f), origin(0.) {}; 00028 DynamicScale(double f, double o): factor(f), origin(o) {}; 00029 00030 // yeah, we really check for excatly zero here..! 00031 bool has_origin() const { return !(origin==0.); }; 00032 }; 00033 00034 } // namespace detail 00035 00036 }; // namespace physical 00037 00038 #endif
Generated on Mon Apr 2 22:25:03 2007 for physical_svn by 1.5.1-p1 | hosted on |