Explanation below :) What is sine (sin) and cosine (cos)? Sin and cos are usually associated with concepts in trigonometry, however, today, I'd like to show another way of thinking about how we can use them. Notice: To understand this, we need to have a rough understanding coordinate systems (x,y). In short, we are able to think of sin and cos as conversion tools between direction and coordinates: Direction → coordinates another way to phrase it is: degrees → ( x , y ) Here’s an example: Taking the sin of 90deg will return the horizontal coordinate (x position) of the tip of an arrow pointing 90 degrees. With sin and cos, we treat the arrow as length = 1, so, if we set the arrow’s direction to 90 on the demo, we can see the X component = 1, as the arrow is pointing to the right, so the X coordinate should be exactly equal to the length of the arrow. Cos on the other hand is the same concept but for the Y position, so taking the cos(90) is 0, as the vertical component of an arrow pointing to the right is zero. When putting the two together we can see that if sin(90) returns 1 and cos(90) returns 0 we get the coordinates (1, 0) corresponding to the coordinates of the tip of the arrow (given the arrow is of length 1). _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_- Abs is short absolute value, what that does, is it takes a number, and turns it positive. Pretty straight forward. It is very useful in math, and simplifies a lot of code.