Posted in Python onFebruary 16, 2014
function cal_pace(d,h,m,s){ var distance = d; var hours = h; var minutes = m; var seconds = s; if(distance.length > 0 && hours.length > 0 && minutes.length > 0 && seconds.length > 0) { var speed = parseFloat(hours) * 60.0 + parseFloat(minutes) + parseFloat(seconds) / 60.0; speed = speed / parseFloat(distance); var speed_minutes = Math.floor(speed); var speed_seconds = Math.floor((speed - speed_minutes) * 60.0); return (speed_minutes + '\'' + speed_seconds + '\"').toString(); } return '0\'0\"'; }
python根据距离和时长计算配速示例
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@