Code

Disable the page selector when there's only one page
[inkscape.git] / src / geom.cpp
index 2749d6d7d34fee19dc04d88f8c0a485a4f796468..e59b0f30233ae211b981c5986b3b98d2503c5c97 100644 (file)
  *
  * This function finds the intersection of the two lines (infinite)
  * defined by n0.X = d0 and x1.X = d1.  The algorithm is as follows:
- * To compute the intersection point use kramer's rule:
+ * To compute the intersection point use Cramer's rule:
+ * (see http://en.wikipedia.org/wiki/Cramer%27s_rule)
  * \verbatim
  * convert lines to form
  * ax + by = c
  * dx + ey = f
- * 
+ *
  * (
  *  e.g. a = (x2 - x1), b = (y2 - y1), c = (x2 - x1)*x1 + (y2 - y1)*y1
  * )
- * 
+ *
  * In our case we use:
  *   a = n0.x     d = n1.x
  *   b = n0.y     e = n1.y
  *   c = d0        f = d1
- * 
+ *
  * so:
- * 
+ *
  * adx + bdy = cd
  * adx + aey = af
- * 
+ *
  * bdy - aey = cd - af
  * (bd - ae)y = cd - af
- * 
+ *
  * y = (cd - af)/(bd - ae)
- * 
+ *
  * repeat for x and you get:
- * 
+ *
  * x = (fb - ce)/(bd - ae)                \endverbatim
- * 
+ *
  * If the denominator (bd-ae) is 0 then the lines are parallel, if the
- * numerators are then 0 then the lines coincide. 
+ * numerators are then 0 then the lines coincide.
  *
- * \todo Why not use existing but outcommented code below 
+ * \todo Why not use existing but outcommented code below
  * (HAVE_NEW_INTERSECTOR_CODE)?
  */
 IntersectorKind intersector_line_intersection(NR::Point const &n0, double const d0,
@@ -69,12 +70,12 @@ IntersectorKind intersector_line_intersection(NR::Point const &n0, double const
             return PARALLEL;
         }
     }
-    
+
     double Y = n0[NR::X] * d1 -
                n1[NR::X] * d0;
-    
+
     result = NR::Point(X, Y) / denominator;
-    
+
     return INTERSECTS;
 }