Code center > Darwinbots3

enginering a compromize

<< < (2/2)

Botsareus:
Numsgil I know I am losing your comprehensibility. It's time for me to slow down and use a diffetent approach:

Numsgil it's time for me to learn some c#. I will explain the following code when you call me; Hopefully together we can translate it to c#.

mtt 'move to top command

--- Quote ---abs(stack(50))-->A
abs(stack(49))-->B
If A+B < 51 and A != 0 and B != 0
Then
  For(D,50,3,-1)
  stack(D-2)-->stack(D)
  End
  0-->stack(1)
  0-->stack(2)
  A-->dim(templist)
  For(D,1,A)
  stack(51-D-B)-->templist(D)
  End
  For(D,51-B,50)
  stack(D)-->stack(D-A)
  End
  For(D,1,A)
  templist(D)-->stack(51-D)
  End
End
--- End quote ---

Botsareus:
The reason we need multi clone and multi move commands is for things like mult that use two variables instead of 1. And we deffinatly need it for "ang", which uses 4 variables. (That is if you like ang enough to add it, I think its deffinatly worth while.) ang returns the angle and distance for any 4 numbers. even if it's atn(1/0) it will return 90 instead, stuff like that.  And since you are generating an angle from 4 numbers why not get the distance between them as well?

--- Quote ---A = angle from point(x1,y1) to point (x2,y2)
B = Distance from point(x1,y1) to point (x2,y2)
--- End quote ---

Navigation

[0] Message Index

[*] Previous page

Go to full version