summaryrefslogtreecommitdiff
path: root/boost/units/base_units/angle
diff options
context:
space:
mode:
Diffstat (limited to 'boost/units/base_units/angle')
-rw-r--r--boost/units/base_units/angle/arcminute.hpp36
-rw-r--r--boost/units/base_units/angle/arcsecond.hpp37
-rw-r--r--boost/units/base_units/angle/degree.hpp27
-rw-r--r--boost/units/base_units/angle/gradian.hpp27
-rw-r--r--boost/units/base_units/angle/radian.hpp48
-rw-r--r--boost/units/base_units/angle/revolution.hpp36
-rw-r--r--boost/units/base_units/angle/steradian.hpp48
7 files changed, 259 insertions, 0 deletions
diff --git a/boost/units/base_units/angle/arcminute.hpp b/boost/units/base_units/angle/arcminute.hpp
new file mode 100644
index 0000000..86bf5e0
--- /dev/null
+++ b/boost/units/base_units/angle/arcminute.hpp
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UNIT_BASE_UNITS_ANGLE_ARCMINUTE_HPP_INCLUDED
+#define BOOST_UNIT_BASE_UNITS_ANGLE_ARCMINUTE_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/angle/degree.hpp>
+
+namespace boost {
+namespace units {
+namespace angle {
+
+typedef scaled_base_unit<degree_base_unit, scale<60, static_rational<-1> > > arcminute_base_unit;
+
+}
+
+template<>
+struct base_unit_info<angle::arcminute_base_unit> {
+ static const char* name() { return("arcminute"); }
+ static const char* symbol() { return("'"); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_BASE_UNITS_ANGLE_ARCMINUTE_HPP_INCLUDED
diff --git a/boost/units/base_units/angle/arcsecond.hpp b/boost/units/base_units/angle/arcsecond.hpp
new file mode 100644
index 0000000..8baabfa
--- /dev/null
+++ b/boost/units/base_units/angle/arcsecond.hpp
@@ -0,0 +1,37 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UNIT_SYSTEMS_ANGLE_ARCSECOND_HPP_INCLUDED
+#define BOOST_UNIT_SYSTEMS_ANGLE_ARCSECOND_HPP_INCLUDED
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/angle/degree.hpp>
+
+namespace boost {
+namespace units {
+namespace angle {
+
+//typedef scaled_base_unit<degree_base_unit, scale<60, static_rational<-2> > > arcsecond_base_unit;
+typedef scaled_base_unit<degree_base_unit, scale<3600, static_rational<-1> > > arcsecond_base_unit;
+
+}
+
+template<>
+struct base_unit_info<angle::arcsecond_base_unit> {
+ static const char* name() { return("arcsecond"); }
+ static const char* symbol() { return("\""); }
+};
+
+}
+}
+
+#endif // BOOST_UNIT_SYSTEMS_ANGLE_ARCSECOND_HPP_INCLUDED
diff --git a/boost/units/base_units/angle/degree.hpp b/boost/units/base_units/angle/degree.hpp
new file mode 100644
index 0000000..63edb70
--- /dev/null
+++ b/boost/units/base_units/angle/degree.hpp
@@ -0,0 +1,27 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UNITS_ANGLE_DEGREE_BASE_UNIT_HPP
+#define BOOST_UNITS_ANGLE_DEGREE_BASE_UNIT_HPP
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/base_units/angle/radian.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(angle,degree,"degree","deg",6.28318530718/360.,boost::units::angle::radian_base_unit,-101);
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::degree_base_unit)
+
+#endif
+
+#endif // BOOST_UNITS_ANGLE_DEGREE_BASE_UNIT_HPP
diff --git a/boost/units/base_units/angle/gradian.hpp b/boost/units/base_units/angle/gradian.hpp
new file mode 100644
index 0000000..7b291b4
--- /dev/null
+++ b/boost/units/base_units/angle/gradian.hpp
@@ -0,0 +1,27 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UNITS_ANGLE_GRADIAN_BASE_UNIT_HPP
+#define BOOST_UNITS_ANGLE_GRADIAN_BASE_UNIT_HPP
+
+#include <boost/units/conversion.hpp>
+#include <boost/units/base_units/angle/radian.hpp>
+
+BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(angle,gradian,"gradian","grad",6.28318530718/400.,boost::units::angle::radian_base_unit,-102);
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::gradian_base_unit)
+
+#endif
+
+#endif // BOOST_UNITS_ANGLE_GRADIAN_BASE_UNIT_HPP
diff --git a/boost/units/base_units/angle/radian.hpp b/boost/units/base_units/angle/radian.hpp
new file mode 100644
index 0000000..f2b5667
--- /dev/null
+++ b/boost/units/base_units/angle/radian.hpp
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UNITS_ANGLE_RADIAN_BASE_UNIT_HPP
+#define BOOST_UNITS_ANGLE_RADIAN_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/plane_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace angle {
+
+struct radian_base_unit : public base_unit<radian_base_unit, plane_angle_dimension, -2>
+{
+ static std::string name() { return("radian"); }
+ static std::string symbol() { return("rad"); }
+};
+
+} // namespace angle
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::radian_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/angle/conversions.hpp>
+
+#endif // BOOST_UNITS_ANGLE_RADIAN_BASE_UNIT_HPP
diff --git a/boost/units/base_units/angle/revolution.hpp b/boost/units/base_units/angle/revolution.hpp
new file mode 100644
index 0000000..2dd0d5b
--- /dev/null
+++ b/boost/units/base_units/angle/revolution.hpp
@@ -0,0 +1,36 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UNITS_BASE_UNITS_REVOLUTION_HPP
+#define BOOST_UNITS_BASE_UNITS_REVOLUTION_HPP
+
+#include <boost/units/scaled_base_unit.hpp>
+#include <boost/units/static_rational.hpp>
+#include <boost/units/scale.hpp>
+#include <boost/units/base_units/angle/degree.hpp>
+
+namespace boost {
+namespace units {
+namespace angle {
+
+typedef scaled_base_unit<degree_base_unit, scale<360, static_rational<1> > > revolution_base_unit;
+
+}
+
+template<>
+struct base_unit_info<angle::revolution_base_unit> {
+ static const char* name() { return("revolution"); }
+ static const char* symbol() { return("rev"); }
+};
+
+}
+}
+
+#endif // BOOST_UNITS_BASE_UNITS_REVOLUTION_HPP
diff --git a/boost/units/base_units/angle/steradian.hpp b/boost/units/base_units/angle/steradian.hpp
new file mode 100644
index 0000000..5e8c5bd
--- /dev/null
+++ b/boost/units/base_units/angle/steradian.hpp
@@ -0,0 +1,48 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2007-2008 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UNITS_ANGLE_STERADIAN_BASE_UNIT_HPP
+#define BOOST_UNITS_ANGLE_STERADIAN_BASE_UNIT_HPP
+
+#include <string>
+
+#include <boost/units/config.hpp>
+#include <boost/units/base_unit.hpp>
+#include <boost/units/physical_dimensions/solid_angle.hpp>
+
+namespace boost {
+
+namespace units {
+
+namespace angle {
+
+struct steradian_base_unit : public base_unit<steradian_base_unit, solid_angle_dimension, -1>
+{
+ static std::string name() { return("steradian"); }
+ static std::string symbol() { return("sr"); }
+};
+
+} // namespace angle
+
+} // namespace units
+
+} // namespace boost
+
+#if BOOST_UNITS_HAS_BOOST_TYPEOF
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_REGISTER_TYPE(boost::units::angle::steradian_base_unit)
+
+#endif
+
+//#include <boost/units/base_units/angle/conversions.hpp>
+
+#endif // BOOST_UNITS_ANGLE_STERADIAN_BASE_UNIT_HPP