functionto_unit1
Change the unit of a Real number to unit="1"
Extends from Modelica.Units.Icons.Conversion (Base icon for conversion functions).
Information
Syntax
Modelica.Units.Conversions.to_unit1(r);
Description
The function call "Conversions.to_unit1(r)" returns r with unit="1".
Example
Modelica.Units.SI.Velocity v = {3,2,1};
Real direction[3](unit="1") = to_unit1(v); // Automatically vectorized call of to_unit1
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | r | Real number |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | result | Real number r with unit="1" |