예제 #1
0
파일: Entity.php 프로젝트: guancio/Runalyze
 protected function calculatePaceArray()
 {
     if (!$this->has(self::PACE)) {
         $PaceCalculator = new PaceCalculator($this);
         $PaceCalculator->calculate();
         $this->set(self::PACE, $PaceCalculator->result());
     }
 }
예제 #2
0
 public function testSmoothPaceForRuntasticData()
 {
     $Calculator = new PaceCalculator(new Object(array(Object::TIME => array(0, 25, 27, 31, 32, 35, 37, 39, 45, 50), Object::DISTANCE => array(0.0, 0.0, 0.0, 0.052, 0.052, 0.052, 0.052, 0.052, 0.07099999999999999, 0.08500000000000001))));
     $this->assertEquals(array(596, 596, 596, 596, 737, 737, 737, 737, 737, 357), $Calculator->calculate());
 }