August 2017
Beginner
566 pages
12h 34m
English
Now we're going to make some vectors. Every time somebody clicks on the Button control, you get to make a vector. So, between a set of curly braces under the line that begins with protected void Button1_Click..., enter the following:
Vector vec1 = new Vector(1, 2);
So (1, 2) refers to the x and y coordinates of the vector. Repeat this a couple of times as follows, renaming the vector vec2, vec3, and so on. Also, change the x and y coordinates as shown here so that they're not all the same; otherwise, it's going to get confusing:
Vector vec2 = new Vector(3, 4);Vector vec3 = new Vector(5, 6);
Imagine that you want to add these vectors together. For example, you want to add the first vector to the second vector and then the third ...
Read now
Unlock full access