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

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

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

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

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