Skip to content

Commit 5da215d

Browse files
committed
Minor language updates to PVector ref pages
1 parent bf3db76 commit 5da215d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

content/api_en/PVector.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ void draw() {
2929
</example>
3030

3131
<description><![CDATA[
32-
A class to describe a two or three dimensional vector. This datatype stores two or three variables that are commonly used as a position, velocity, and/or acceleration. Technically, <em>position</em> is a point and <em>velocity</em> and <em>acceleration</em> are vectors, but this is often simplified to consider all three as vectors. For example, if you consider a rectangle moving across the screen, at any given instant it has a position (the object's location, expressed as a point.), a velocity (the rate at which the object's position changes per time unit, expressed as a vector), and acceleration (the rate at which the object's velocity changes per time unit, expressed as a vector). Since vectors represent groupings of values, we cannot simply use traditional addition/multiplication/etc. Instead, we'll need to do some "vector" math, which is made easy by the methods inside the <b>PVector</b> class.<br />
32+
A class to describe a two or three dimensional vector, specifically a Euclidean (also known as geometric) vector. A vector is an entity that has both magnitude and direction. The datatype, however, stores the components of the vector (x,y for 2D, and x,y,z for 3D). The magnitude and direction can be accessed via the methods <b>mag()</b> and <b>heading()</b>.<br/>
33+
<br/>
34+
In many of the Processing examples, you will see <b>PVector</b> used to describe a position, velocity, or acceleration. For example, if you consider a rectangle moving across the screen, at any given instant it has a position (a vector that points from the origin to its location), a velocity (the rate at which the object's position changes per time unit, expressed as a vector), and acceleration (the rate at which the object's velocity changes per time unit, expressed as a vector). Since vectors represent groupings of values, we cannot simply use traditional addition/multiplication/etc. Instead, we'll need to do some "vector" math, which is made easy by the methods inside the <b>PVector</b> class.<br />
3335
<br />
3436
The methods for this class are extensive. For a complete list, visit the <a href="http://processing.googlecode.com/svn/trunk/processing/build/javadoc/core/processing/core/PVector.html">developer's reference.</a>
3537
]]></description>

content/api_en/PVector_magSq.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void setup() {
2323
</example>
2424

2525
<description><![CDATA[
26-
Calculates the magnitude (length) of the vector, squared.
26+
Calculates the magnitude (length) of the vector, squared. This method is often used to improve performance since, unlike <b>mag()</b>, it does not require a <b>sqrt()</b> operation.
2727
]]></description>
2828

2929
</root>

0 commit comments

Comments
 (0)