Some Basic Mathematical Concepts
- Coordinates: one standard way of representing location is by
cartesian coordinates. This is usually an x and a y value.
In 3D games, it is a 3-tuple. The order seems to vary from
game to game.
- Mathematical functions are operators. So *-+ and power are
all operators. Functions in programs are similar though they
may have side effects. Functions can take mutliple arguments.
- Powers and exponents x^2 = x*x; x^3 = x*x*x; 5^3 = 5*5*5=125;
x^.5
- Roots squareRoot(x)=y -> y*y=x
- Simplifying, there are a lot of ways to simplify equations.
- In general, you can apply the same operator to both sides of
an equation.
- E.g. 4(x^2) + y + 7 = 2y +3
- 4(x^2)+7 = y +3 (subtact y from both sides)
- 4(x^2)= y-4 (subract 7 from both sides)
- x^2 = y/4 -1 (divide both sides by 4)
- x = squareRoot(y/4 -1) (take the squareRoot of both sides)
- Do note that I assume you already know all of this.