I need to calculate how to reverse a heading within a NetLogo script e.g. a turtle has a heading of 0, I need to flip this to 180 so they travel in the opposite direction.
I've tried [360 - heading] with limited success.
For the record heading - 180 works, of course, but if you want to be more "turtle centric", you could ask your turtle to rt 180.
Ahh got it. I knew I was close
[heading - 180]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With