Answer the question
In order to leave comments, you need to log in
How to correctly calculate the number of steps per minute?
const minsFromHours = 0 < timer.hour ? +timer.hour * 60 : 0;
const minsFromSecs = 0 < timer.sec ? +timer.sec / 60 : 0;
// @todo - or simplify to seconds and then / 60?
return +(minsFromHours + minsFromSecs + +timer.min).toFixed(2);
steps / timerMinutes
Answer the question
In order to leave comments, you need to log in
you have some twisted logic. normally.
of course divide the steps into minutes. but it will be average. and it all depends on the task.
and how to convert seconds to minutes refers to working with time, and not steps in particular and the title of the question in general.
What is this, some kind of joke???
What is "kilometers per hour" or "steps per minute", what to divide by what - is taught in the fifth grade.
How many seconds are in a minute and how to convert minutes into seconds - they teach in the third grade.
If we read such a question from "Web Architect" - then either it's a joke, or - if it's not funny - then this Web Architect is still in elementary school.
And the people fell for it easily.
By the way, maybe it's just someone who decided to start a discussion about the need for mathematics in programming? :-)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question