0 Members and 1 Guest are viewing this topic.
The sin( and the cos( functions both return values from -127 to +127. The period is from 0 to 256, so if you were to draw a sine curve it starts at 0, crosses the x-axis at 128 and ends again on the x-axis on 256.
x' = x*cos q - y*sin qy' = x*sin q + y*cos qz' = z
x' = ((x*cos(q)) - (y*sin(q)))/127y' = ((x*sin(q)) + (y*cos(q)))/127z' = z