math.TimeFraction

From Garry's Mod
Jump to: navigation, search
 math.TimeFraction( )

Contents

Description

Returns the fraction of where the current time is relative to the start and end times

Arguments

number start

Start time in seconds

Arguments

number end

End time in seconds

Arguments

number current

Current time in seconds

Returns

number

Fraction

Examples

Example

Prints the time fraction of 5 between 0 and 10

print(math.TimeFraction(0, 10, 5))

Output:

0.5
Personal tools
Navigation