|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76895 - trunk/boost/geometry/arithmetic
From: barend.gehrels_at_[hidden]
Date: 2012-02-05 06:18:52
Author: barendgehrels
Date: 2012-02-05 06:18:51 EST (Sun, 05 Feb 2012)
New Revision: 76895
URL: http://svn.boost.org/trac/boost/changeset/76895
Log:
cross_product.hpp which is now splitted into cross_product (the real) and determinant
Text files modified:
trunk/boost/geometry/arithmetic/cross_product.hpp | 70 ----------------------------------------
1 files changed, 0 insertions(+), 70 deletions(-)
Modified: trunk/boost/geometry/arithmetic/cross_product.hpp
==============================================================================
--- trunk/boost/geometry/arithmetic/cross_product.hpp (original)
+++ trunk/boost/geometry/arithmetic/cross_product.hpp 2012-02-05 06:18:51 EST (Sun, 05 Feb 2012)
@@ -71,30 +71,6 @@
}
};
-
-template <typename ReturnType, typename U, typename V>
-class cross_product2
-{
- template <typename T>
- static inline ReturnType rt(T const& v)
- {
- return boost::numeric_cast<ReturnType>(v);
- }
-
-public :
-
- // Most common dimension, as also defined by Wolfram:
- // http://mathworld.wolfram.com/CrossProduct.html
- // "In two dimensions, the analog of the cross product for u=(u_x,u_y) and v=(v_x,v_y) is
- // uxv = det(uv)
- // = u_x v_y - u_y v_x"
- static inline ReturnType apply(U const& ux, U const& uy
- , V const& vx, V const& vy)
- {
- return rt(ux) * rt(vy) - rt(uy) * rt(vx);
- }
-};
-
} // namespace detail
#endif // DOXYGEN_NO_DETAIL
@@ -129,52 +105,6 @@
}
-/*!
-\brief Computes the cross product of two vectors, version for four values
-\details Because we often have the four coordinate values (often differences)
- available, it is convenient to have a version which works directly on these,
- without having to make a (temporary) Point or Vector
-\ingroup arithmetic
-\return the cross product value
- */
-template <typename ReturnType, typename U, typename V>
-inline ReturnType cross_product2(U const& ux, U const& uy
- , V const& vx, V const& vy)
-{
- return detail::cross_product2
- <
- ReturnType, U, V
- >::apply(ux, uy, vx, vy);
-}
-
-// Synonym, because yes, sometimes the algorithm calls it "determinant"
-template <typename ReturnType, typename U, typename V>
-inline ReturnType determinant(U const& ux, U const& uy
- , V const& vx, V const& vy)
-{
- return detail::cross_product2
- <
- ReturnType, U, V
- >::apply(ux, uy, vx, vy);
-}
-
-
-// TEMPORARY, to be harmonized with cross_product
-template <typename ReturnType, typename U, typename V>
-inline ReturnType cross_product2(U const& u, V const& v)
-{
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<U>) );
- BOOST_CONCEPT_ASSERT( (concept::ConstPoint<V>) );
-
- return detail::cross_product2
- <
- ReturnType,
- typename geometry::coordinate_type<U>::type,
- typename geometry::coordinate_type<V>::type
- >::apply(get<0>(u), get<1>(u), get<0>(v), get<1>(v));
-}
-
-
}} // namespace boost::geometry
#endif // BOOST_GEOMETRY_ARITHMETIC_CROSS_PRODUCT_HPP
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk