Commit 7391ffae authored by darin@apple.com's avatar darin@apple.com

2010-02-04 Darin Adler <darin@apple.com>

        Reviewed by David Levin.

        Make MathExtras.h compatible with <cmath>
        https://bugs.webkit.org/show_bug.cgi?id=34618

        * wtf/MathExtras.h: Include <cmath> instead of <math.h>.
        Use "using" as we do elsewhere in WTF for the four functions from <cmath>
        we want to use without the prefix. Later we could consider making the std
        explicit at call sites instead.


git-svn-id: svn://svn.chromium.org/blink/trunk@54388 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8d116c80
2010-02-04 Darin Adler <darin@apple.com>
Reviewed by David Levin.
Make MathExtras.h compatible with <cmath>
https://bugs.webkit.org/show_bug.cgi?id=34618
* wtf/MathExtras.h: Include <cmath> instead of <math.h>.
Use "using" as we do elsewhere in WTF for the four functions from <cmath>
we want to use without the prefix. Later we could consider making the std
explicit at call sites instead.
2010-02-04 Tamas Szirbucz <szirbucz@inf.u-szeged.hu> 2010-02-04 Tamas Szirbucz <szirbucz@inf.u-szeged.hu>
Reviewed by Gavin Barraclough. Reviewed by Gavin Barraclough.
......
/* /*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
#ifndef WTF_MathExtras_h #ifndef WTF_MathExtras_h
#define WTF_MathExtras_h #define WTF_MathExtras_h
#include <cmath>
#include <float.h> #include <float.h>
#include <math.h>
#include <stdlib.h> #include <stdlib.h>
#if OS(SOLARIS) #if OS(SOLARIS)
...@@ -186,4 +186,9 @@ inline float deg2turn(float d) { return d / 360.0f; } ...@@ -186,4 +186,9 @@ inline float deg2turn(float d) { return d / 360.0f; }
inline float rad2grad(float r) { return r * 200.0f / piFloat; } inline float rad2grad(float r) { return r * 200.0f / piFloat; }
inline float grad2rad(float g) { return g * piFloat / 200.0f; } inline float grad2rad(float g) { return g * piFloat / 200.0f; }
using std::isfinite;
using std::isinf;
using std::isnan;
using std::signbit;
#endif // #ifndef WTF_MathExtras_h #endif // #ifndef WTF_MathExtras_h
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment