private function getValue(AbstractScale $scale) { if (is_null($this->precise)) { return $scale->getValue(); } return round($scale->getValue(), $this->precise); }
/** * @param AbstractScale $scale * @param $symbol scale symbol * @return AbstractScale * @throws \Exception */ public function buildByScale(AbstractScale $scale, $symbol) { $newScale = $this->supportedScalesCollection->get($symbol); $newScale->setValueInCelsius($scale->getValueInCelsius()); $newScale->setFactory($this); $newScale->setFormatter($this->getFormatter()); return $newScale; }