diff --git a/gfx/2d/Matrix.cpp b/gfx/2d/Matrix.cpp index dc319bedcf8..6b7804ad65f 100644 --- a/gfx/2d/Matrix.cpp +++ b/gfx/2d/Matrix.cpp @@ -90,8 +90,8 @@ Matrix::Rotation(Float aAngle) { Matrix newMatrix; - Float s = sin(aAngle); - Float c = cos(aAngle); + Float s = sinf(aAngle); + Float c = cosf(aAngle); newMatrix._11 = c; newMatrix._12 = s; diff --git a/gfx/2d/PathD2D.cpp b/gfx/2d/PathD2D.cpp index e442d113a0b..2032862dc71 100644 --- a/gfx/2d/PathD2D.cpp +++ b/gfx/2d/PathD2D.cpp @@ -267,8 +267,8 @@ PathBuilderD2D::Arc(const Point &aOrigin, Float aRadius, Float aStartAngle, } Point endPoint; - endPoint.x = aOrigin.x + aRadius * cos(aEndAngle); - endPoint.y = aOrigin.y + aRadius * sin(aEndAngle); + endPoint.x = aOrigin.x + aRadius * cosf(aEndAngle); + endPoint.y = aOrigin.y + aRadius * sinf(aEndAngle); D2D1_ARC_SIZE arcSize = D2D1_ARC_SIZE_SMALL; D2D1_SWEEP_DIRECTION direction = @@ -296,8 +296,8 @@ PathBuilderD2D::Arc(const Point &aOrigin, Float aRadius, Float aStartAngle, else { // draw small circles as two half-circles Point midPoint; - midPoint.x = aOrigin.x + aRadius * cos(midAngle); - midPoint.y = aOrigin.y + aRadius * sin(midAngle); + midPoint.x = aOrigin.x + aRadius * cosf(midAngle); + midPoint.y = aOrigin.y + aRadius * sinf(midAngle); mSink->AddArc(D2D1::ArcSegment(D2DPoint(midPoint), D2D1::SizeF(aRadius, aRadius), diff --git a/gfx/2d/image_operations.h b/gfx/2d/image_operations.h index 2744e2c67f8..8e319136327 100644 --- a/gfx/2d/image_operations.h +++ b/gfx/2d/image_operations.h @@ -185,8 +185,8 @@ inline float EvalLanczos(int filter_size, float x) { x < std::numeric_limits::epsilon()) return 1.0f; // Special case the discontinuity at the origin. float xpi = x * static_cast(M_PI); - return (sin(xpi) / xpi) * // sinc(x) - sin(xpi / filter_size) / (xpi / filter_size); // sinc(x/filter_size) + return (sinf(xpi) / xpi) * // sinc(x) + sinf(xpi / filter_size) / (xpi / filter_size); // sinc(x/filter_size) } // Evaluates the Hamming filter of the given filter size window for the given @@ -212,8 +212,8 @@ inline float EvalHamming(int filter_size, float x) { return 1.0f; // Special case the sinc discontinuity at the origin. const float xpi = x * static_cast(M_PI); - return ((sin(xpi) / xpi) * // sinc(x) - (0.54f + 0.46f * cos(xpi / filter_size))); // hamming(x) + return ((sinf(xpi) / xpi) * // sinc(x) + (0.54f + 0.46f * cosf(xpi / filter_size))); // hamming(x) } // ResizeFilter ----------------------------------------------------------------