PVectors in Class Objects

The example bellow explains alias & clone w/ more detail:

a = PVector.random2D(this) # new PVector object w/ random content
b = a # variable b is an alias of a, b/c they both refer to the same object
c = a.get() # variable c is a clone of a w/ exact same initial content

print a, b, c

print a == b, a == c, b == c # True True True
print a is b, a is c, b is c # True False False

b.div(2) # mutating b also mutates its alias a w/o affecting c
print a, b, c

c.sub(b) # mutating c won't affect either a or b
print a, b, c

exit()

Notice operator == checks content equality while is checks identity (memory address).