Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 127
Closed
Description
Created by: arijit4
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.
An implementation might look like the following :
voidsetHeading(floatangle){this.rotate(angle -this.heading())}Metadata
Metadata
Assignees
Labels
No labels