Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Vector/Processing/vector.processing
Normal file
16
Task/Vector/Processing/vector.processing
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
PVector v1 = new PVector(5, 7);
|
||||
PVector v2 = new PVector(2, 3);
|
||||
|
||||
println(v1.x, v1.y, v1.mag(), v1.heading(),'\n');
|
||||
|
||||
// static methods
|
||||
println(PVector.add(v1, v2));
|
||||
println(PVector.sub(v1, v2));
|
||||
println(PVector.mult(v1, 11));
|
||||
println(PVector.div(v1, 2), '\n');
|
||||
|
||||
// object methods
|
||||
println(v1.sub(v1));
|
||||
println(v1.add(v2));
|
||||
println(v1.mult(10));
|
||||
println(v1.div(10));
|
||||
Loading…
Add table
Add a link
Reference in a new issue