3.10.0
This commit is contained in:
parent
1ec4204fd2
commit
790fba67b8
|
|
@ -13,9 +13,9 @@ using System.Runtime.CompilerServices;
|
||||||
internal static class RevisionClass
|
internal static class RevisionClass
|
||||||
{
|
{
|
||||||
public const string Major = "3";
|
public const string Major = "3";
|
||||||
public const string Minor = "9";
|
public const string Minor = "10";
|
||||||
public const string Build = "0";
|
public const string Build = "0";
|
||||||
public const string Revision = "3531";
|
public const string Revision = "3533";
|
||||||
|
|
||||||
public const string MainVersion = Major + "." + Minor;
|
public const string MainVersion = Major + "." + Minor;
|
||||||
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
%MINOR%=9
|
%MINOR%=10
|
||||||
%REVISION%=3531
|
%REVISION%=3533
|
||||||
%COREVERSION%=0
|
%COREVERSION%=0
|
||||||
%MAJOR%=3
|
%MAJOR%=3
|
||||||
|
|
|
||||||
11
InstallerSamples/WhatsNew/3_10_0/DrawPoints.pas
Normal file
11
InstallerSamples/WhatsNew/3_10_0/DrawPoints.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
uses Turtle;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Window.Title := 'DrawPoints';
|
||||||
|
var n := 1000;
|
||||||
|
var d := 10;
|
||||||
|
var a := ArrRandomReal(n,-d,d);
|
||||||
|
DrawPoints(a[::2],a[1::2]);
|
||||||
|
a := ArrRandomReal(n,-d,d);
|
||||||
|
DrawPoints(a[::2],a[1::2]);
|
||||||
|
end.
|
||||||
28
InstallerSamples/WhatsNew/3_10_0/TurtleNew.pas
Normal file
28
InstallerSamples/WhatsNew/3_10_0/TurtleNew.pas
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
uses Turtle;
|
||||||
|
|
||||||
|
procedure Hilbert(level: integer; angle,step: real);
|
||||||
|
begin
|
||||||
|
if level = 0 then
|
||||||
|
exit;
|
||||||
|
TurnRight(angle);
|
||||||
|
Hilbert(level-1, -angle, step);
|
||||||
|
|
||||||
|
Forw(step);
|
||||||
|
TurnLeft(angle);
|
||||||
|
Hilbert(level-1, angle, step);
|
||||||
|
|
||||||
|
Forw(step);
|
||||||
|
Hilbert(level-1, angle, step);
|
||||||
|
|
||||||
|
TurnLeft(angle);
|
||||||
|
Forw(step);
|
||||||
|
Hilbert(level-1, -angle, step);
|
||||||
|
TurnRight(angle);
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
SetWidth(2);
|
||||||
|
ToPoint(-9,-9);
|
||||||
|
Down;
|
||||||
|
Hilbert(6,90,0.3);
|
||||||
|
end.
|
||||||
|
|
@ -1 +1 @@
|
||||||
3.9.0.3531
|
3.10.0.3533
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
!define VERSION '3.9.0.3531'
|
!define VERSION '3.10.0.3533'
|
||||||
|
|
|
||||||
|
|
@ -11352,9 +11352,9 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
/// Разбивает последовательность на серии длины size
|
/// Разбивает последовательность на серии длины size
|
||||||
function Batch<T>(Self: sequence of T; size: integer): sequence of sequence of T; extensionmethod;
|
function Batch<T>(Self: sequence of T; size: integer): sequence of array of T; extensionmethod;
|
||||||
begin
|
begin
|
||||||
var buf := new List<T>;
|
var buf := new List<T>(size);
|
||||||
foreach var elm in Self do begin
|
foreach var elm in Self do begin
|
||||||
buf.Add(elm);
|
buf.Add(elm);
|
||||||
if buf.Count=size then begin
|
if buf.Count=size then begin
|
||||||
|
|
@ -11368,10 +11368,10 @@ begin
|
||||||
end;
|
end;
|
||||||
|
|
||||||
/// Разбивает последовательность на серии длины size и применяет проекцию к каждой серии
|
/// Разбивает последовательность на серии длины size и применяет проекцию к каждой серии
|
||||||
function Batch<T, Res>(Self: sequence of T; size: integer; proj: Func<IEnumerable<T>, Res>): sequence of Res; extensionmethod;
|
function Batch<T, Res>(Self: sequence of T; size: integer; proj: Func<array of T, Res>): sequence of Res; extensionmethod;
|
||||||
begin
|
begin
|
||||||
//Result := SeqWhile(Self, v -> v.Skip(size), v -> v.Count > 0).Select(v -> v.Take(size)).Select(ss -> proj(ss));
|
//Result := SeqWhile(Self, v -> v.Skip(size), v -> v.Count > 0).Select(v -> v.Take(size)).Select(ss -> proj(ss));
|
||||||
Result := Self.Batch(size).Select(ss -> proj(ss));
|
Result := Self.Batch(size).Select(proj);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
///--
|
///--
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue