Game Development Reference
In-Depth Information
Figure 6.5
With a negative slope and a negative y-intercept, the line slopes toward quadrant IV.
Negative Shifts
You can define linear equations so that the y-intercept is negative. As Figure 6.5
illustrates, when you combine a negative slope value with a negative y-intercept,
the line shifts down on the y axis and slopes downward toward quadrant IV. It
no longer passes through quadrant I. When you set the slope to 1 and the
y-intercept to 2, then the line crosses the y axis at 2. The value of y when x
equals 2 is 4. On the other side of the y axis, when x is equal to 2, y is equal to 0.
Multiplying a negative value of x by the negative slope generates a positive value,
so the value of y continues to increase as the negative values of x increase.
 
Search WWH ::




Custom Search