Skip to content

Commit ef5ad42

Browse files
authored
Update Algoritma_CORDIC.py
1 parent cbc2145 commit ef5ad42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Algoritma_CORDIC.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
#elif(sd == 0):
1616
i = 1
1717
#for i in range(12):
18+
acc = 0.005 #Akurasi, semakin mendekati nol semakin akurat
1819
while(True):
1920
print(i)
2021
#i = 1
21-
if(sd > -0.005 and sd < 0.005):
22+
if(sd > -acc and sd < acc):
2223
break
2324
elif(sd == 0):
2425
break
@@ -39,4 +40,4 @@
3940
#print(K)
4041
x,y = K*m_rotasi*np.matrix([[1],[0]])
4142
print("Nilai cos =", x[0])
42-
print("Nilai sin =", y[0])
43+
print("Nilai sin =", y[0])

0 commit comments

Comments
 (0)