function units_dimension_multiply in Units of Measurement 7.2
Multiply a dimension array by a constant factor.
Parameters
array $dimension: Dimension array to be multiplied
int $multiplier: Constant factor by which to multiply the dimension array
Return value
array Dimension array: result of the multiplication
1 call to units_dimension_multiply()
- units_operator_exponent_dimension in plugins/
operator/ exponent.inc
File
- ./
units.module, line 528 - Provide API for managing and converting units of measurement.
Code
function units_dimension_multiply($dimension, $multiplier) {
foreach ($dimension as $k => $v) {
$dimension[$k] = $v * $multiplier;
}
return $dimension;
}