--- a/gfx/layers/BSPTree.cpp
+++ b/gfx/layers/BSPTree.cpp
@@ -6,17 +6,17 @@
#include "BSPTree.h"
#include "mozilla/gfx/Polygon.h"
namespace mozilla {
namespace layers {
namespace {
-static int signum(float d) {
+static int sign(float d) {
if (d > 0) return 1;
if (d < 0) return -1;
return 0;
}
}
@@ -158,17 +158,17 @@ BSPTree::SplitPolygon(const gfx::Polygon
// The point is behind the plane.
if (dotA <= 0) {
backPoints.AppendElement(a);
}
// If the sign of the dot product changes between two consecutive vertices,
// the splitting plane intersects the corresponding polygon edge.
- if (signum(dotA) != signum(dotB)) {
+ if (sign(dotA) != sign(dotB)) {
// Calculate the line segment and plane intersection point.
const gfx::Point3D ab = b - a;
const float dotAB = ab.DotProduct(normal);
const float t = -dotA / dotAB;
const gfx::Point3D p = a + (ab * t);
// Add the intersection point to both polygons.