Скачиваний:
64
Добавлен:
01.05.2014
Размер:
594 б
Скачать
// Ellipse.cpp: implementation of the Ellipse class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Ellipse.h"
#include <math.h>

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Ellipse::Ellipse(double a, double b) : Curve (a, b) // Вызываем конструктор предка
{
}

double Ellipse::get(double x)
{
	return sqrt((1 - x * x / a * a) * b * b); // x^2/a^2+y^2/b^2 = 1 => y=sqrt((1-x^2/a^2)*b^2)
}
Соседние файлы в папке prj4