Page 2 of 2

Re: Draw Grid

Posted: Mon Nov 18, 2024 10:08 am
by Flinx
jPV wrote: Mon Nov 18, 2024 9:42 am It would be a good practise to do as little calculations as possible inside loops always
+2 :)

Yes, I wanted to do an example like that too, but I didn't have the time.
The last multiplication can be replaced by a Step in the Next loop, and the grid doesn't actually need two function calls.

Re: Draw Grid

Posted: Mon Nov 18, 2024 10:34 am
by jPV
Flinx wrote: Mon Nov 18, 2024 10:08 am The last multiplication can be replaced by a Step in the Next loop, and the grid doesn't actually need two function calls.
Ah right, of course. Something like this:

Code: Select all

	For Local x = 1 To GH Step GS
		Line (0, x, dw, x, GC, {Thickness = LT})
	Next

Re: Draw Grid

Posted: Tue Nov 19, 2024 10:23 pm
by oceanarts
Thanks for the pointers, guys. Much appreciated. :)