Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions content/references/translations/en/processing/PVector.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@
"name": "heading()",
"desc": "Calculate the angle of rotation for this vector"
},
{
"anchor": "PVector_setHeading_",
"name": "setHeading()",
"desc": "Set the direction for this vector"
},
{
"anchor": "PVector_rotate_",
"name": "rotate()",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
"brief": "Calculate the angle of rotation for this vector",
"related": [],
"name": "heading()",
"description": "Calculate the angle of rotation for this vector (only 2D vectors)",
"syntax": [".heading()"],
"description": "Calculate the vector's direction, that is, the angle this vector makes\n with the positive X axis (only 2D vectors)",
"syntax": ["myPVector.heading()"],
"returns": "float",
"type": "method",
"category": "pvector",
"subcategory": "method",
"classanchor": "PVector",
"parameters": []
"parameters": [
{
"name": "myPVector",
"description": "your PVector object",
"type": ["PVector"]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"brief": "Set the direction for this vector",
"related": ["PVector_heading_"],
"name": "setHeading()",
"description": "Sets the angle this vector makes with the positive X axis (only 2D vectors)\n This is equivalent to changing the vector's direction to the given value.",
"syntax": ["myPVector.setHeading(angle)"],
"returns": "PVector",
"type": "method",
"category": "pvector",
"subcategory": "method",
"classanchor": "PVector",
"parameters": [
{
"name": "myPVector",
"description": "your PVector object",
"type": ["PVector"]
},
{
"name": "angle",
"description": "the direction of the resultant vector",
"type": ["float"]
}
]
}