Report the amount by which the turtles
' coordinates ycor
would change
if the turtles
were
to move forward the given distances with their current headings
.
dy(turtles, dist = 1) # S4 method for agentMatrix,numeric dy(turtles, dist = 1) # S4 method for agentMatrix,missing dy(turtles)
turtles 


dist  Numeric. Vector of distances the 
Numeric. Vector of length turtles
.
Report the cosine of the turtles
' heading
multiplied by the dist
values. Heading 0 is north and angles are calculated in degrees in a
clockwise manner.
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and ComputerBased Modeling, Northwestern University. Evanston, IL.
Sarah Bauduin
w1 < createWorld(minPxcor = 0, maxPxcor = 4, minPycor = 0, maxPycor = 4) t1 < createOTurtles(world = w1, n = 10) dy(turtles = t1)#> [1] 1.00000 0.80902 0.30902 0.30902 0.80902 1.00000 0.80902 0.30902 #> [9] 0.30902 0.80902