示例#1
0
文件: Data.php 项目: guancio/Runalyze
 /**
  * Recalculate VDOT shape
  * @return float new shape
  */
 public function recalculateVDOTshape()
 {
     $Shape = new JD\Shape(DB::getInstance(), SessionAccountHandler::getId(), Configuration::General()->runningSport(), Configuration::Vdot());
     $Shape->setCorrector(new JD\VDOTCorrector($this->vdotFactor()));
     $Shape->calculate();
     $this->updateVdotShape($Shape->value());
     return $Shape->value();
 }
示例#2
0
 public function testUseFlag()
 {
     $this->PDO->exec('INSERT INTO `' . PREFIX . 'training` VALUES(1, 1, ' . time() . ', 1, 1, 50, 0)');
     $this->PDO->exec('INSERT INTO `' . PREFIX . 'training` VALUES(1, 1, ' . time() . ', 1, 0, 80, 0)');
     $Shape = new Shape($this->PDO, 1, 1, new CategoryFake());
     $Shape->calculate();
     $this->assertEquals(50, $Shape->value());
 }