Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Turtle graphics
#9
(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
...
Reply


Messages In This Thread
Turtle graphics - by Tomaaz - 02-13-2024, 05:13 PM
RE: Turtle graphics - by Marcus - 02-13-2024, 05:58 PM
RE: Turtle graphics - by johnno56 - 02-13-2024, 07:28 PM
RE: Turtle graphics - by Tomaaz - 02-13-2024, 08:09 PM
RE: Turtle graphics - by johnno56 - 02-13-2024, 08:57 PM
RE: Turtle graphics - by Tomaaz - 02-13-2024, 11:37 PM
RE: Turtle graphics - by Marcus - 02-14-2024, 07:28 PM
RE: Turtle graphics - by Tomaaz - 02-14-2024, 08:54 PM
RE: Turtle graphics - by 1micha.elok - 02-15-2024, 04:11 AM
RE: Turtle graphics - by Tomaaz - 02-15-2024, 08:18 AM
RE: Turtle graphics - by 1micha.elok - 02-15-2024, 09:22 AM
RE: Turtle graphics - by Tomaaz - 02-15-2024, 12:17 PM
RE: Turtle graphics - by Marcus - 02-15-2024, 06:59 PM
RE: Turtle graphics - by Tomaaz - 02-15-2024, 08:35 PM
RE: Turtle graphics - by 1micha.elok - 02-16-2024, 02:22 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)