
Добавил:
Angel_of_Death
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:
#include "stdafx.h"
#include "Line.h"
#define _USE_MATH_DEFINES
#include <math.h>
#include <iostream>
using namespace std;
Line::Line()
{
x1 = 0;
y1 = 0;
L = 0;
}
void Line::SetLine(Point a, Point b)
{
x = a.GetX();
y = a.GetY();
x1 = b.GetX();
y1 = b.GetY();
}
void Line::Length()
{
L = sqrt((x1 - x)*(x1 - x) + (y1 - y)*(y1 - y));
}
double Line::GetLength()
{
return L;
}
void Line::View()
{
Length();
cout << "Parameters Line: " << endl;
cout << "x = " << x << ", " << "y = " << y << endl;
cout << "x1 = " << x1 << ", " << "y1 = " << y1 << endl;
cout << "L = " << L << endl;
}
Line::~Line()
{
}
Соседние файлы в папке Lab3