Salome HOME
Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for...
[modules/shaper.git] / src / GeomAPI / GeomAPI_XY.cpp
index beff35c27fadb9f10b5cab6efaddb22cd98181e8..5cfeff6badaa0dc444d4d6b16a17f2eb9f1f7a10 100644 (file)
@@ -1,3 +1,5 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
 // File:        GeomAPI_XY.cpp
 // Created:     30 May 2014
 // Author:      Artem ZHIDKOV
@@ -35,7 +37,16 @@ void GeomAPI_XY::setY(const double theY)
 
 const std::shared_ptr<GeomAPI_XY> GeomAPI_XY::added(const std::shared_ptr<GeomAPI_XY>& theArg)
 {
-  std::shared_ptr<GeomAPI_XY> aResult(new GeomAPI_XY(MY_XY->X() + theArg->x(), MY_XY->Y() + theArg->y()));
+  std::shared_ptr<GeomAPI_XY> aResult(new GeomAPI_XY(
+      MY_XY->X() + theArg->x(), MY_XY->Y() + theArg->y()));
+  return aResult;
+}
+
+const std::shared_ptr<GeomAPI_XY> GeomAPI_XY::decreased(
+    const std::shared_ptr<GeomAPI_XY>& theArg)
+{
+  std::shared_ptr<GeomAPI_XY> aResult(new GeomAPI_XY(
+      MY_XY->X() - theArg->x(), MY_XY->Y() - theArg->y()));
   return aResult;
 }