Skip to content

Commit 74d09cc

Browse files
committed
fpm layout
1 parent b0480f9 commit 74d09cc

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
cmake_minimum_required(VERSION 3.14...3.22)
1+
cmake_minimum_required(VERSION 3.14)
22

33
project(DonutFortran LANGUAGES Fortran)
44

5-
enable_testing()
6-
7-
add_executable(donut donut.f90)
5+
add_executable(donut app/main.f90)

donut.f90 renamed to app/main.f90

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,26 @@ program donut
4949
z=0
5050
screen=""
5151
j=0
52+
sinA = sin(a)
53+
cosA = cos(a)
54+
cosB = cos(b)
55+
sinB = sin(b)
5256
do while(2*pi > j)
5357
i=0
58+
cosj = cos(j)
59+
cosj2 = cosj+2
60+
sinj = sin(j)
5461
do while(2*pi > i)
5562
sini = sin(i)
56-
cosj = cos(j)
57-
sinA = sin(a)
58-
sinj = sin(j)
59-
cosA = cos(a)
60-
cosj2 = cosj+2
63+
cosi = cos(i)
6164
mess = 1 / (sini*cosj2*sinA+sinj*cosA+5)
62-
cosi=cos(i)
63-
cosB=cos(b)
64-
sinB=sin(b)
6565
t = sini*cosj2*cosA - sinj*sinA
6666
x = 40 + 30*mess*(cosi*cosj2*cosB - t*sinB)
6767
y = 12 + 15*mess*(cosi*cosj2*sinB + t*cosB)
6868
o = min(L, x+cols*y) !< C program goes out of bounds
6969
N = int(8*((sinj*sinA - sini*cosj*cosA)*cosB - sini*cosj*sinA - sinj*cosA - cosi * cosj*sinB))
7070
if(rows>y .and. y>0 .and. x>0 .and. cols>x .and. mess>z(o)) then
71-
z(o)=mess
71+
z(o) = mess
7272
screen(o) = TAB(max(N,0))
7373
endif
7474
i = i + 0.02

0 commit comments

Comments
 (0)