From 5c1278a91b8572d4f9e261c63603e0262b4cfd7d Mon Sep 17 00:00:00 2001
From: Subhraman Sarkar <suvrax@gmail.com>
Date: Wed, 26 Mar 2025 08:28:48 +0530
Subject: [PATCH 1/3] PVector doc update

---
 core/src/processing/core/PVector.java | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/core/src/processing/core/PVector.java b/core/src/processing/core/PVector.java
index a2bdd4718c..326ba7e4e7 100644
--- a/core/src/processing/core/PVector.java
+++ b/core/src/processing/core/PVector.java
@@ -848,13 +848,15 @@ public PVector setMag(PVector target, float len) {
 
   /**
    *
-   * Calculate the angle of rotation for this vector (only 2D vectors)
-   *
+   * Calculate the vector's direction, that is, the angle this vector makes
+   * with the positive X axis (only 2D vectors)
+   * 
    *
    * @webref pvector:method
    * @usage web_application
-   * @return the angle of rotation
+   * @return the direction of the vector (angle with positive X axis)
    * @webBrief  Calculate the angle of rotation for this vector
+   * @see PVector#setHeading()
    */
   public float heading() {
     float angle = (float) Math.atan2(y, x);
@@ -867,7 +869,18 @@ public float heading2D() {
     return heading();
   }
 
-
+  /**
+   *
+   * Sets the angle this vector makes with the positive X axis (only 2D vectors)
+   * This is equivalent to changing the vector's direction to the given value.
+   *
+   * @webref pvector:method
+   * @usage web_application
+   * @param angle the direction of the resultant vector
+   * @return this vector, rotated to have the given direction
+   * @webBrief  Set the direction for this vector
+   * @see PVector#heading()
+   */
   public PVector setHeading(float angle) {
     float m = mag();
     x = (float) (m * Math.cos(angle));

From b107ab7cd9c0c9a0bf83150c994870372dc24365 Mon Sep 17 00:00:00 2001
From: Subhraman Sarkar <suvrax@gmail.com>
Date: Wed, 26 Mar 2025 09:42:16 +0530
Subject: [PATCH 2/3] Add setHeading entry to keywords.txt

---
 java/keywords.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/keywords.txt b/java/keywords.txt
index bf02b74d98..506057a64e 100644
--- a/java/keywords.txt
+++ b/java/keywords.txt
@@ -751,6 +751,7 @@ random2D	FUNCTION2	PVector_random2D_
 random3D	FUNCTION2	PVector_random3D_
 rotate	FUNCTION2	PVector_rotate_
 set	FUNCTION2	PVector_set_
+setHeading	FUNCTION2	PVector_setHeading_
 setMag	FUNCTION2	PVector_setMag_
 sub	FUNCTION2	PVector_sub_
 quad	FUNCTION1	quad_

From 7d691d8a3c35fc957d62856dc03208204545920f Mon Sep 17 00:00:00 2001
From: Subhraman Sarkar <suvrax@gmail.com>
Date: Wed, 26 Mar 2025 20:46:27 +0530
Subject: [PATCH 3/3] Add more missing entries to keywords list

---
 java/keywords.txt | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/java/keywords.txt b/java/keywords.txt
index 506057a64e..b156241501 100644
--- a/java/keywords.txt
+++ b/java/keywords.txt
@@ -503,6 +503,7 @@ size	FUNCTION2	FloatList_size_
 sort	FUNCTION2	FloatList_sort_
 sortReverse	FUNCTION2	FloatList_sortReverse_
 sub	FUNCTION2	FloatList_sub_
+toArray	FUNCTION2	FloatList_toArray_
 floor	FUNCTION1	floor_
 focused	KEYWORD4	focused
 frameCount	KEYWORD4	frameCount
@@ -559,6 +560,7 @@ size	FUNCTION2	IntList_size_
 sort	FUNCTION2	IntList_sort_
 sortReverse	FUNCTION2	IntList_sortReverse_
 sub	FUNCTION2	IntList_sub_
+toArray	FUNCTION2	IntList_toArray_
 join	FUNCTION1	join_
 JSONArray	KEYWORD5	JSONArray
 append	FUNCTION2	JSONArray_append_
@@ -579,6 +581,8 @@ setJSONArray	FUNCTION2	JSONArray_setJSONArray_
 setJSONObject	FUNCTION2	JSONArray_setJSONObject_
 setString	FUNCTION2	JSONArray_setString_
 size	FUNCTION2	JSONArray_size_
+toIntArray	FUNCTION2	JSONArray_toIntArray_
+toStringArray	FUNCTION2	JSONArray_toStringArray_
 JSONObject	KEYWORD5	JSONObject
 getBoolean	FUNCTION2	JSONObject_getBoolean_
 getFloat	FUNCTION2	JSONObject_getFloat_
@@ -848,6 +852,7 @@ shuffle	FUNCTION2	StringList_shuffle_
 size	FUNCTION2	StringList_size_
 sort	FUNCTION2	StringList_sort_
 sortReverse	FUNCTION2	StringList_sortReverse_
+toArray	FUNCTION2	StringList_toArray_
 upper	FUNCTION2	StringList_upper_
 stroke	FUNCTION1	stroke_
 strokeCap	FUNCTION1	strokeCap_
@@ -912,6 +917,13 @@ unbinary	FUNCTION1	unbinary_
 unhex	FUNCTION1	unhex_
 updatePixels	FUNCTION1	updatePixels_
 vertex	FUNCTION1	vertex_
+windowMove	FUNCTION1	windowMove_
+windowMoved	FUNCTION1	windowMoved_
+windowRatio	FUNCTION1	windowRatio_
+windowResizable	FUNCTION1	windowResizable_
+windowResize	FUNCTION1	windowResize_
+windowResized	FUNCTION1	windowResized_
+windowTitle	FUNCTION1	windowTitle_
 XML	KEYWORD5	XML
 addChild	FUNCTION2	XML_addChild_
 format	FUNCTION2	XML_format_