public function Measurement::divide in Physical Fields 8
Divides the current measurement by the given number.
Parameters
string $number: The number.
Return value
static The resulting measurement.
File
- src/
Measurement.php, line 167
Class
- Measurement
- Provides a base class for measurement value objects.
Namespace
Drupal\physicalCode
public function divide($number) {
$new_number = Calculator::divide($this->number, $number);
return new static($new_number, $this->unit);
}