set pvector
in
Contributed Library Questions
•
1 year ago
Hi,
Im watching the libray physics:
Im watching the libray physics:
In the simple pendulum example, it appears this code:
p.position().set( mouseX, mouseY, 0 );
p is a particle object and position is a pVector
But in the processing webpage:
http://processing.org/reference/PVector_set_.html
It appears this example:
PVector v;
void setup() {
size(100, 100);
v = new PVector(0.0, 0.0, 0.0);
v.set(20.0, 30.0, 40.0);
println(v.x); // Prints "20.0"
println(v.y); // Prints "30.0"
println(v.z); // Prints "40.0"
void setup() {
size(100, 100);
v = new PVector(0.0, 0.0, 0.0);
v.set(20.0, 30.0, 40.0);
println(v.x); // Prints "20.0"
println(v.y); // Prints "30.0"
println(v.z); // Prints "40.0"
Why in physics example there is a parenthesis: position ()?
1