Вернул назад форматтер else в case

ParametricTrajectory в Graph3D.pas
This commit is contained in:
Mikhalkovich Stanislav 2019-08-25 22:15:30 +03:00
parent b986e8354b
commit ed73eda4f3
2 changed files with 6 additions and 1 deletions

View file

@ -1728,7 +1728,7 @@ namespace CodeFormatters
//IncOffset();
add_new_line_else_specific = true;
IncOffset();
if (!(_case_node.else_statement is statement_list sl && sl.list.Count == 1 && sl.list[0] is empty_statement))
//if (!(_case_node.else_statement is statement_list sl && sl.list.Count == 1 && sl.list[0] is empty_statement))
visit_node(_case_node.else_statement);
//DecOffset();
}

View file

@ -2644,6 +2644,9 @@ function EmptyAnim(sec: real): EmptyAnimation;
// -----------------------------------------------------
//>> Graph3D: функции для определения ближайших точек и объектов # Graph3D functions for nearest points and objects
// -----------------------------------------------------
/// Создаёт траекторию в виде массива точек, заданную параметрически. Функция fun отображает параметр t на координаты точки в пространстве
function ParametricTrajectory(a,b: real; N: integer; fun: real->Point3D): sequence of Point3D;
/// Возвращает ближайший 3D-объект, который пересекает луч, выпущенный из камеры и проходящий через точку (x,y) экрана
function FindNearestObject(x, y: real): Object3D;
@ -3419,6 +3422,8 @@ function Triangle(p1, p2, p3: Point3D; m: Material): TriangleT := Inv(()->Triang
// Функции для точек, лучей, прямых, плоскостей
function ParametricTrajectory(a,b: real; N: integer; fun: real->Point3D) := PartitionPoints(a,b,N).Select(fun);
function FindNearestObject(x, y: real): Object3D;
begin
Result := nil;