Update of /cvsroot/boost-sandbox/boost-sandbox/libs/units/example
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17296/boost-sandbox/libs/units/example
Modified Files:
unit_example_4.cpp
Log Message:
qualified radians to avoid ambiguity with SI::radians
Index: unit_example_4.cpp
===================================================================
RCS file: /cvsroot/boost-sandbox/boost-sandbox/libs/units/example/unit_example_4.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- unit_example_4.cpp 3 Apr 2007 17:12:57 -0000 1.6
+++ unit_example_4.cpp 4 Apr 2007 19:20:10 -0000 1.7
@@ -372,7 +372,7 @@
//[unit_example_4_snippet_6
/// test trig stuff
- quantity<angles::radians::radian> theta = 0.375*radians;
+ quantity<angles::radians::radian> theta = 0.375*boost::units::radians;
quantity<angles::radians::dimensionless> sin_theta = sin(theta);
quantity<angles::radians::radian> thetap = asin(sin_theta);
//]
@@ -497,9 +497,9 @@
sstream2 << "no typeof" << std::endl;
#endif // BOOST_UNITS_HAS_TYPEOF
sstream2 << std::endl;
- sstream2 << "theta = 0.375 rad" << std::endl;
- sstream2 << "sin(theta) = 0.366273 dimensionless" << std::endl;
- sstream2 << "asin(sin(theta)) = 0.375 rad" << std::endl;
+ sstream2 << "theta = " << 0.375 << " rad" << std::endl;
+ sstream2 << "sin(theta) = " << 0.366273 << " dimensionless" << std::endl;
+ sstream2 << "asin(sin(theta)) = " << 0.375 << " rad" << std::endl;
sstream2 << std::endl;
sstream2 << "V = (12.5,0) m^2 kg s^(-3) A^(-1)" << std::endl;
sstream2 << "I = (3,4) A" << std::endl;
|