Salome HOME
Sources formated according to the codeing standards
[modules/shaper.git] / src / GeomAPI / GeomAPI_Lin2d.cpp
index 5267000f3be66ce32a4042b8148834d4b46780cd..1e902f4b5fd07e31304dda01b852b1028eba7852 100644 (file)
 
 #define MY_LIN2D static_cast<gp_Lin2d*>(myImpl)
 
-static gp_Lin2d* newLine2d(const double theStartX, const double theStartY,
-                           const double theEndX,   const double theEndY)
+static gp_Lin2d* newLine2d(const double theStartX, const double theStartY, const double theEndX,
+                           const double theEndY)
 {
   gp_XY aDir(theEndX - theStartX, theEndY - theStartY);
   gp_Pnt2d aStart(theStartX, theStartY);
   return new gp_Lin2d(aStart, gp_Dir2d(aDir));
 }
 
-
-GeomAPI_Lin2d::GeomAPI_Lin2d(const double theStartX, const double theStartY,
-                             const double theEndX,   const double theEndY)
-  : GeomAPI_Interface(newLine2d(theStartX, theStartY, theEndX, theEndY))
-{}
+GeomAPI_Lin2d::GeomAPI_Lin2d(const double theStartX, const double theStartY, const double theEndX,
+                             const double theEndY)
+    : GeomAPI_Interface(newLine2d(theStartX, theStartY, theEndX, theEndY))
+{
+}
 
 GeomAPI_Lin2d::GeomAPI_Lin2d(const boost::shared_ptr<GeomAPI_Pnt2d>& theStart,
-                         const boost::shared_ptr<GeomAPI_Pnt2d>& theEnd)
-  : GeomAPI_Interface(newLine2d(theStart->x(), theStart->y(),
-                                theEnd->x(),   theEnd->y()))
-{}
+                             const boost::shared_ptr<GeomAPI_Pnt2d>& theEnd)
+    : GeomAPI_Interface(newLine2d(theStart->x(), theStart->y(), theEnd->x(), theEnd->y()))
+{
+}
 
 double GeomAPI_Lin2d::distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther) const
 {
@@ -40,16 +40,17 @@ double GeomAPI_Lin2d::distance(const boost::shared_ptr<GeomAPI_Pnt2d>& theOther)
 }
 
 const boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::intersect(
-                const boost::shared_ptr<GeomAPI_Lin2d>& theLine) const
+    const boost::shared_ptr<GeomAPI_Lin2d>& theLine) const
 {
   IntAna2d_AnaIntersection anInter(*MY_LIN2D, theLine->impl<gp_Lin2d>());
   if (!anInter.IsDone() || anInter.IsEmpty())
-    return boost::shared_ptr<GeomAPI_Pnt2d>();
+  return boost::shared_ptr<GeomAPI_Pnt2d>();
   const gp_Pnt2d& aResult = anInter.Point(1).Value();
   return boost::shared_ptr<GeomAPI_Pnt2d>(new GeomAPI_Pnt2d(aResult.X(), aResult.Y()));
 }
 
-const boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::project(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) const
+const boost::shared_ptr<GeomAPI_Pnt2d> GeomAPI_Lin2d::project(
+    const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint) const
 {
   const gp_XY& aDir = MY_LIN2D->Direction().XY();
   const gp_XY& aLoc = MY_LIN2D->Location().XY();