Skip to content

W4IT-Dev/rubiks-cube-average-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rubik's Cube Average Calculator

Calculate custom averages for Rubik's Cube timing.


Easy to understand and use

What you need

An array with times in 1/10 seconds. Example:

let times = [{
   time: 10
},
{
   time: 50
},
{
   time: 47
}];

How to use

calcAvg(averageOf, calculateOneAverage, index);

'averageOf' is the number of time values to include in the average calculation.

'calculateOneAverage' is a boolean indicating whether to calculate just one average or irritate over the whole time array.

'index' is the starting index for calculating a single average when 'calculateOneAverage' is true.

Usage

console.log(calcAvg(5, true, 2);

About

Calculate custom averages for rubiks cube timing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published