22 lines
287 B
Text
22 lines
287 B
Text
define theta = 0, real = 0, imag = 0
|
|
define pi = 3.14, n = 5
|
|
|
|
for m = 0 to n - 1
|
|
|
|
let theta = m * (pi * 2) / n
|
|
let real = cos(theta)
|
|
let imag = sin(theta)
|
|
|
|
if imag >= 0 then
|
|
|
|
print real, comma, " ", imag, "i"
|
|
|
|
else
|
|
|
|
print real, comma, " ", imag * -1, "i"
|
|
|
|
endif
|
|
|
|
wait
|
|
|
|
next m
|