Ignore:
Timestamp:
Oct 12, 2007, 8:40:54 AM (18 years ago)
Author:
oliver
Message:

JavaScriptCore:

Reviewed by Eric Seidel.

Fix for http://bugs.webkit.org/show_bug.cgi?id=15076
"deg2rad has multiple definitions"

Define deg2rad, rad2deg, deg2grad, grad2deg, rad2grad, grad2rad
These are used through WebKit.

Change based on original patch by Rob Buis.

  • wtf/MathExtras.h: (deg2rad): (rad2deg): (deg2grad): (grad2deg): (rad2grad): (grad2rad):

WebCore:

Reviewed by Eric Seidel.

Fix for http://bugs.webkit.org/show_bug.cgi?id=15076
"deg2rad has multiple definitions"

Use deg2rad, rad2deg, deg2grad, grad2deg, rad2grad, grad2rad
from wtf where appropriate.

No test cases as this doesn't change behaviour.

Change based on original patch by Rob Buis.

  • ksvg2/svg/SVGAngle.cpp: (WebCore::SVGAngle::calculate): (WebCore::SVGAngle::convertToSpecifiedUnits): (WebCore::SVGAngle::todeg): (WebCore::SVGAngle::torad):
  • platform/graphics/AffineTransform.cpp: (WebCore::AffineTransform::rotateFromVector): (WebCore::AffineTransform::skewX): (WebCore::AffineTransform::skewY):
  • platform/graphics/cg/AffineTransformCG.cpp: (WebCore::AffineTransform::rotate):
  • platform/graphics/svg/filters/cg/SVGFEColorMatrixCg.mm:
  • platform/graphics/svg/filters/cg/SVGFEHelpersCg.h:
  • platform/graphics/svg/filters/cg/SVGFEHelpersCg.mm:
  • rendering/RenderPath.cpp: (WebCore::drawMarkerWithData):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/MathExtras.h

    r25542 r26542  
    137137#endif // #if COMPILER(MSVC)
    138138
     139inline double deg2rad(double d)  { return d * piDouble / 180.0; }
     140inline double rad2deg(double r)  { return r * 180.0 / piDouble; }
     141inline double deg2grad(double d) { return d * 400.0 / 360.0; }
     142inline double grad2deg(double g) { return g * 360.0 / 400.0; }
     143inline double rad2grad(double r) { return r * 200.0 / piDouble; }
     144inline double grad2rad(double g) { return g * piDouble / 200.0; }
     145
     146inline float deg2rad(float d)  { return d * piFloat / 180.0f; }
     147inline float rad2deg(float r)  { return r * 180.0f / piFloat; }
     148inline float deg2grad(float d) { return d * 400.0f / 360.0f; }
     149inline float grad2deg(float g) { return g * 360.0f / 400.0f; }
     150inline float rad2grad(float r) { return r * 200.0f / piFloat; }
     151inline float grad2rad(float g) { return g * piFloat / 200.0f; }
     152
    139153#endif // #ifndef WTF_MathExtras_h
Note: See TracChangeset for help on using the changeset viewer.