The absolute value function returns the absolute value of any given argument. This means that the function will always return a positive value when the argument is negative. We show this by using a sine function as an argument for the abs function
sphere.YPosition = abs( sin( time * 90 ) * 2 );
this will invert the negative portion of the sine wave.
|