[haiku-commits] haiku: hrev44722 - headers/cpp/std

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 27 Oct 2012 15:48:16 +0200 (CEST)

hrev44722 adds 1 changeset to branch 'master'
old head: 39f5f3042c1014d277d972b1c909566789ce1985
new head: 7ee53ed3bd2222305c93a4959f8c587c373ed97c

----------------------------------------------------------------------------

7ee53ed: Add tan(), tanh(), log10() to std::complex
  Keep the haiku/ version of the headers in sync with buildtools
  (see btrev43041)
  
  I'm curious: why do we have a copy of these headers in haiku/ tree ?

                [ Adrien Destugues - PulkoMandy <pulkomandy@xxxxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44722
Commit:      7ee53ed3bd2222305c93a4959f8c587c373ed97c
URL:         http://cgit.haiku-os.org/haiku/commit/?id=7ee53ed
Author:      Adrien Destugues - PulkoMandy <pulkomandy@xxxxxxxxxxxxx>
Date:        Sat Oct 27 13:44:59 2012 UTC

----------------------------------------------------------------------------

1 file changed, 16 insertions(+)
headers/cpp/std/complext.h | 16 ++++++++++++++++

----------------------------------------------------------------------------

diff --git a/headers/cpp/std/complext.h b/headers/cpp/std/complext.h
index d3eb98a..0e70194 100644
--- a/headers/cpp/std/complext.h
+++ b/headers/cpp/std/complext.h
@@ -387,6 +387,22 @@ template <class _FLT> complex<_FLT>
 template <class _FLT> complex<_FLT>
   sqrt (const complex<_FLT>&) __attribute__ ((const));
 
+template <class _FLT> inline complex<_FLT>
+tan (const complex<_FLT>& x)
+{
+  return sin (x) / cos (x);
+}
+template <class _FLT> inline complex<_FLT>
+tanh (const complex<_FLT>& x)
+{
+  return sinh (x) / cosh (x);
+}
+template <class _FLT> inline complex<_FLT>
+log10 (const complex<_FLT>& x)
+{
+  return log (x) / log (10.0);
+}
+
 template <class _FLT> istream& operator >> (istream&, complex<_FLT>&);
 template <class _FLT> ostream& operator << (ostream&, const complex<_FLT>&);
 } // extern "C++"


Other related posts:

  • » [haiku-commits] haiku: hrev44722 - headers/cpp/std - pulkomandy