Code: (Select All)
Sub orbit (x0rigin, yOrigin, radius, degrees, xOut, yOut) ' all default single should be ok
xOut = x0rigin + radius * Cos(_D2R(degrees))
yOut = yOrigin + radius * Sin(_D2R(degrees))
End Subx0rigin, yOrigin.......radius
o--------------------->
.\oooooooooooooo
..\ooooooooooooo
...\ooooooooooo degrees
....\oooooooo
.....\ooooo
......vo
.......(xOut, yOut)
orbit is a Sub not a Function so it returns it's results: xOut and yOut as changed inputs to the sub so the calling code can use xOut, yOut for the point that is radius away from xOrigin, yOrigin at degrees clockwise from 0 degrees that is due east.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever

