02-15-2024, 04:11 AM
(02-13-2024, 05:13 PM)Tomaaz Wrote: So, here is my simple (and very basic) Turtle graphics library ..
Code:...
function sprawdz ()
if katzolwia > 360 then
katzolwia = katzolwia - 360
endif
if katzolwia < 0 then
katzolwia = katzolwia + 360
endif
endfunc
...
...
I found that "these angle 0 and and 360" would be missed in the calculation, I proposed to add >= and <=, so that your function would be
Code:
...
function sprawdz ()
if katzolwia >= 360 then
katzolwia = katzolwia - 360
endif
if katzolwia <= 0 then
katzolwia = katzolwia + 360
endif
endfunc
...