In this project you will find the following blocks:
Note: you can drag and drop those images in Snap! to get the blocks! after clicking "original image".
Blocks are listed in order of dependency. So, to import last block, you need to import the previous ones.
unwrapPosition(A): if it's a vector, does nothing. If it's a sprite, extract its position as vector,
midpoint(A,B) : compute midpoint of a vector or sprites positions
length(A): length of vector
normalize(A): normalize a vector (create a unit vector with same direction)
project(A,B): projects A onto B (shadow of A cast on B if sun rays normal to B)
vector(A,B): considers A and B as point and create a vector out of them (B-A)
orthogonal(A): creates an orthogonal vector with same length (norm)
rotatet(A, theta): rotates tethat degrees
Project link: https://snap.berkeley.edu/project?username=programaths&projectname=vectors