From 4940d8d669c7b18b83076aed44aedf78ae385bd9 Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Fri, 13 Mar 2015 12:22:57 +0200 Subject: [PATCH] [extensions][ttmath] add support for fmod free function --- .../extensions/contrib/ttmath_stub.hpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/include/boost/geometry/extensions/contrib/ttmath_stub.hpp b/include/boost/geometry/extensions/contrib/ttmath_stub.hpp index e2ade189b..733d73dd2 100644 --- a/include/boost/geometry/extensions/contrib/ttmath_stub.hpp +++ b/include/boost/geometry/extensions/contrib/ttmath_stub.hpp @@ -1,8 +1,13 @@ // Boost.Geometry (aka GGL, Generic Geometry Library) -// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. -// Copyright (c) 2008-2012 Bruno Lalande, Paris, France. -// Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +// Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2008-2015 Bruno Lalande, Paris, France. +// Copyright (c) 2009-2015 Mateusz Loskot, London, UK. + +// This file was modified by Oracle on 2015. +// Modifications copyright (c) 2015, Oracle and/or its affiliates. + +// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands. @@ -83,7 +88,6 @@ namespace ttmath return ACos(v); } - template inline Big atan2(Big const& y, Big const& x) { @@ -103,6 +107,12 @@ namespace ttmath return two * ATan((sqrt(x * x + y * y) - x) / y); } + // needed in order to work with boost::geometry::math::fmod + template + inline Big fmod(Big const& x, Big const& y) + { + return Mod(x, y); + } } // Specific structure implementing constructor