From ce24f073c5e946b5bad600fca1ca8808657ee9ce Mon Sep 17 00:00:00 2001 From: angeld55 Date: Fri, 16 Apr 2021 15:50:04 +0300 Subject: added sem 8 --- Sem. 08/Nvector/TwoDimCoordSystem.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Sem. 08/Nvector/TwoDimCoordSystem.cpp (limited to 'Sem. 08/Nvector/TwoDimCoordSystem.cpp') diff --git a/Sem. 08/Nvector/TwoDimCoordSystem.cpp b/Sem. 08/Nvector/TwoDimCoordSystem.cpp new file mode 100644 index 0000000..e7a7072 --- /dev/null +++ b/Sem. 08/Nvector/TwoDimCoordSystem.cpp @@ -0,0 +1,18 @@ +#include "TwoDimCoordSystem.h" + +TwoDimCoordSystem::TwoDimCoordSystem(const Nvector& v1, const Nvector& v2) : v1(v1), v2(v2) +{ + if (~v1 != 2 || ~v2 != 2) + throw "Size of vectors should be 2!"; + if (v1 || v2) + throw "Vectors should not be parallel!"; +} + +Nvector TwoDimCoordSystem::getVectorByCoordinates(size_t coordX, size_t coordY) const +{ + //todo +} +Nvector TwoDimCoordSystem::getCoordinatesByVector(const Nvector& other) const +{ + //todo +} \ No newline at end of file -- cgit v1.3.1-23-gd82d