//function to calculate the pulse values and add them to the website function calculate_pulses() { var age var seconds var maxrate var lowerrate var upperrate age = document.pulseForm.age.value; if (age > 99) age = 99; if (age < 1) age = 1; document.pulseForm.age.value = age; seconds = document.pulseForm.seconds.value; maxrate = (220 - age) * seconds / 60; lowerrate = maxrate * 0.60; upperrate = maxrate * 0.85; // percentages /*var lowerrate = maxrate * 0.50; var upperrate = maxrate * 0.75;*/ document.pulseForm.maxrate.value = Math.round(maxrate); document.pulseForm.lowerrate.value = Math.round(lowerrate); document.pulseForm.upperrate.value = Math.round(upperrate); }
Ikäsi: Pulssin olisi hyvä olla välillä – lyöntiä per 603015106 sekuntia.Pulssi ei saisi ylittää lyöntiä.