RosettaCodeData/Task/Roots-of-unity/PascalABC.NET/roots-of-unity.pas
2025-02-27 18:35:13 -05:00

6 lines
151 B
ObjectPascal

function RootsOfUnity(n: integer)
:= (0..n-1).Select(x -> Complex.FromPolarCoordinates(1, 2 * PI * x / n));
begin
RootsOfUnity(3).PrintLines
end.