mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
working on comments for reference
This commit is contained in:
@@ -834,7 +834,25 @@ public class PVector implements Serializable {
|
||||
return -1*angle;
|
||||
}
|
||||
|
||||
|
||||
* @webref pvector:method
|
||||
* @usage web_application
|
||||
* @brief Normalize the vector to a length of 1
|
||||
*/
|
||||
public void normalize() {
|
||||
float m = mag();
|
||||
if (m != 0 && m != 1) {
|
||||
div(m);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ( begin auto-generated from PVector_rotate.xml )
|
||||
*
|
||||
* Normalize the vector to length 1 (make it a unit vector).
|
||||
*
|
||||
* ( end auto-generated )
|
||||
*
|
||||
* Rotate the vector by an angle (only 2D vectors), magnitude remains the same
|
||||
* @param theta the angle of rotation
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user