Rename signum to sign draft
authorMiko Mynttinen <mikokm@gmail.com>
Mon, 08 Aug 2016 13:05:50 -0700
changeset 398886 0bc26cdc42c30be87e6c66d9a4e6414524625089
parent 398885 2b4f56d2115e896835667f2e6b5fe78dbbe9bf83
child 398887 747bb960a7b9c175d04086332893dcda77102a67
push id25668
push userbmo:mikokm@gmail.com
push dateTue, 09 Aug 2016 23:22:28 +0000
milestone51.0a1
Rename signum to sign MozReview-Commit-ID: HYVjhLezslh
gfx/layers/BSPTree.cpp
--- 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.