/** * 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(); }
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()); }