Garry's Mod Wiki

math.TimeFraction

number math.TimeFraction( number start, number end, number current )

Description

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

Arguments

1 number start
Start time in seconds
2 number end
End time in seconds
3 number current
Current time in seconds

Returns

1 number
Fraction

Example

Prints the time fraction of 5 between 0 and 10

print(math.TimeFraction(0, 10, 5))
Output: 0.5

Page Links


Special Pages


Wikis

?

Render Time: 41ms

Session 0
DB GetPage 8
Generate Html 1
SaveChanges 15
Render Body 0
Render Sidebar 14