Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sin cos using SUB SumLocate (x,y,l)
#10
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 Sub

x0rigin, 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.
b = b + ...
Reply


Messages In This Thread
sin cos using SUB SumLocate (x,y,l) - by pmackay - 05-08-2024, 06:53 AM
RE: sin cos using SUB SumLocate (x,y,l) - by bplus - 05-10-2024, 03:13 AM



Users browsing this thread: 16 Guest(s)