コード例 #1
0
        public StepLength CalculateStepLength(Pace pace, int cadence)
        {
            var step1 = 100000 / (pace.Minutes * cadence + (pace.Seconds * cadence / 60));

            StepLength stepLength = new StepLength(step1, CommentMethods.GenerateCommentStepLength(step1));

            return(stepLength);
        }
コード例 #2
0
        public Pace CalculateAveragePace(double distance, DateTime time)
        {
            double timeInSeconds = (time.Hour * 3600) + (time.Minute * 60) + time.Second;

            double paceSeconds = timeInSeconds / distance;

            Pace pace = new Pace((int)paceSeconds / 60, (int)paceSeconds % 60, CommentMethods.GenerateCommentPace(paceSeconds));

            return(pace);
        }