toUnit($unit); return (string) round($value, 2); } /** * For the HTTP Resource call */ public function toJson() { return [ 'ft' => round($this->toUnit('feet'), 2), 'm' => round($this->toUnit('meters') / 1000, 2), ]; } }