Очередная оптимизация
This commit is contained in:
@@ -20,10 +20,6 @@ double Rectangle::Function(double _x, double _y) {
|
||||
return std::max(h_x * std::abs(_x - x), h_y * std::abs(_y - y));
|
||||
}
|
||||
|
||||
std::pair<double, double> Rectangle::Second_Deriative(double _x, double _y) {
|
||||
return { (h_x / 2) * ((_x - x) / std::abs(_x - x)), (h_y / 2) * ((_y - y) / std::abs(_y - y)) };
|
||||
}
|
||||
|
||||
bool Rectangle::Inhere(double x, double y) {
|
||||
return Function(x, y) <= EPS_RECTANGLE;
|
||||
}
|
||||
@@ -44,10 +40,6 @@ double Circle::Function(double _x, double _y) {
|
||||
return pow(h_x * (_x - x), 2) + pow(h_y * (_y - y), 2);
|
||||
}
|
||||
|
||||
std::pair<double, double> Circle::Second_Deriative(double _x, double _y) {
|
||||
return { 2 * h_x * (_x - x), 2 * h_y * (_y - y) };
|
||||
}
|
||||
|
||||
std::pair<double, double> Circle::size() {
|
||||
return { 1 / h_x, 1 / h_y };
|
||||
}
|
||||
@@ -75,19 +67,6 @@ double Arc::Function(double _x, double _y) {
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
std::pair<double, double> Arc::Second_Deriative(double _x, double _y) {
|
||||
if (_x >= x && _y >= y) {
|
||||
return { 2 * h_x * (_x - x), 2 * h_y * (_y - y) };
|
||||
}
|
||||
if (_x < x) {
|
||||
//std::cout << "_x < a\n";
|
||||
}
|
||||
if (_y < y) {
|
||||
//std::cout << "_y < b\n";
|
||||
}
|
||||
return { -1.0, -1.0 };
|
||||
}
|
||||
|
||||
std::pair<double, double> Arc::size() {
|
||||
return { 1 / h_x, 1 / h_y };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user