subHeadings | R Documentation |
headings
Compute the difference between headings
.
subHeadings(angle1, angle2, range360 = FALSE)
## S4 method for signature 'numeric,numeric'
subHeadings(angle1, angle2, range360 = FALSE)
## S4 method for signature 'agentMatrix,numeric'
subHeadings(angle1, angle2, range360 = FALSE)
## S4 method for signature 'numeric,agentMatrix'
subHeadings(angle1, angle2, range360 = FALSE)
## S4 method for signature 'agentMatrix,agentMatrix'
subHeadings(angle1, angle2, range360 = FALSE)
angle1 |
Numeric. Vector of angles. |
angle2 |
Numeric. Vector of angles. |
range360 |
Logical. If |
This function does the opposite as the one in NetLogo where
angle1
is the target heading.
`angle1` and `angle2` must be of the same length or if different, one of them must be of length 1. Positive values mean clockwise rotations, negative value mean counterclockwise rotations.
Numeric. Vector of the smallest angles in degrees
by which angle1
could be rotated to produce angle2
(i.e., the target heading).
Sarah Bauduin
Wilensky, U. 1999. NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University. Evanston, IL.
https://ccl.northwestern.edu/netlogo/docs/dictionary.html#subtract-headings
w1 <- createWorld(minPxcor = 0, maxPxcor = 9, minPycor = 0, maxPycor = 9)
t1 <- createOTurtles(n = 10, world = w1)
subHeadings(angle1 = t1, angle2 = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.