There's an method named PVector.setHeading() in p5.Vector class of p5.js to set the direction of an vector to any given angle. But there's no such option in Processing. It can be settled down easily. But the function seems more self explanatory and easy to understand. It also goes well with the PVector.heading() method already present in Processing.
This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.
Activity
processing-bot commented on Jun 14, 2021
Created by: benfry
Adding it for parity with p5.js… Here's the full implementation from there:
processing-bot commented on Jun 18, 2021
Created by: arijit4
@benfry In 673a19e, you added
shouldn't it be the following?
processing-bot commented on Jun 18, 2021
Created by: benfry
Yes, and it was immediately fixed in the next commit.
processing-bot commented on Jun 18, 2021
Created by: arijit4
@benfry PVector.setHeding() isn't highlighted as other methods in PVector. But it works perfectly though...
processing-bot commented on Jul 19, 2021
Created by: github-actions[bot]
This issue has been automatically locked. To avoid confusion with reports that have already been resolved, closed issues are automatically locked 30 days after the last comment. Please open a new issue for related bugs.