TimedSin

From Garry's Mod
Jump to: navigation, search
 TimedSin( )

Contents

Description

Returns a sine value that fluctuates based on CurTime. The value returned will be between the start value plus/minus the range value.

Due to a bug, the range arguments don't work as intended. The existing (bugged) behavior is documented below.

Arguments

number frequency

The frequency of fluctuation, in hertz

Arguments

number origin

The center value of the sine wave.

Arguments

number max

This argument's distance from origin defines the size of the full range of the sine wave. For example, if origin is 3 and max is 5, then the full range of the sine wave is 5-3 = 2. 3 is the center point of the sine wave, so the sine wave will range between 2 and 4.

Arguments

number offset

Offset variable that doesn't affect the rate of change, but causes the returned value to be offset by time

Returns

number

Sine value
Personal tools
Navigation