RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
lap statistics "decimal minutes/seconds"
Author Message
Reply with quote
Post lap statistics "decimal minutes/seconds" 
Whether or not I can simulate lap data [1] I have a question about the lap statistics "decimal minutes/seconds" --

Is the output of the function a decimal number of seconds which will always be less than 59?

In other words, is a value of 2.30 "two minutes and thirty seconds" or something else?

[1] https://forum.autosportlabs.com/viewtopic.php?t=6149

View user's profile Send private message Visit poster's website
Reply with quote
Post  
Hi,

Decimal minutes means the fractional part is decimal. Example:

2:30 would be 2.5 decimal minutes.

Hope this helps!


_________________
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
View user's profile Send private message Send e-mail
Reply with quote
Post  
brentp wrote:
Hi,

Decimal minutes means the fractional part is decimal. Example:

2:30 would be 2.5 decimal minutes.

Hope this helps!


Yep, it does! But just to make it even clearer for others:

The decimal value of the lap statistic is the equivalent of:

x (sec) / 60

So to convert the decimal part to actual seconds, multiply back by 60.

In Lua terms:

Code:

lap_seconds_portion = (getLapTime()%1)*60


lap_seconds_portion would be the actual number of seconds and not the decimal.

View user's profile Send private message Visit poster's website
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum