You are here

public function Measurement::multiply in Physical Fields 8

Multiplies the current measurement by the given number.

Parameters

string $number: The number.

Return value

static The resulting measurement.

File

src/Measurement.php, line 153

Class

Measurement
Provides a base class for measurement value objects.

Namespace

Drupal\physical

Code

public function multiply($number) {
  $new_number = Calculator::multiply($this->number, $number);
  return new static($new_number, $this->unit);
}