# Global/TimedSin

From Garry's Mod

(Difference between revisions)

m |
m (formatted bug) |
||

Line 2: | Line 2: | ||

|Description=Returns a sine value that fluctuates based on {{GlobalFunction|CurTime}}. The value returned will be between the start value plus/minus the range value. | |Description=Returns a sine value that fluctuates based on {{GlobalFunction|CurTime}}. The value returned will be between the start value plus/minus the range value. | ||

− | + | {{Bug|The range arguments don't work as intended. The existing (bugged) behavior is documented below.}} | |

|Realm=Shared and Menu | |Realm=Shared and Menu | ||

|IsClass=No | |IsClass=No |

## Latest revision as of 06:49, 20 October 2019

## 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.

BUG |
The range arguments don't work as intended. The existing (bugged) behavior is documented below. |

# Arguments

# 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

Sine value