from_cm function
Requirements.Units.Conversions.from_cm
ยท source
Convert from centimetre to metre
Extends Modelica.Units.Icons.Conversion
Convert from centimetre to metre: m := cm/100. The input cm is the value in centimetre (type NonSI.Length_cm), the output m the value in metre (type Modelica.Units.SI.Length). The inverse is to_cm.
The conversion is a multiplication by a constant factor, without offset, so it converts differences and rates alike; it is exact up to floating-point rounding and has no limits on the input. The function is inlined. A check model uses it to write a value of a requirement in the unit in which the requirement states it, from_cm(<value as written>), so that the model reads like the statement; see Conversions. Examples.Elementary.Units.Conversions asserts its factor and the round trip to_cm(from_cm(7)).
Copyright © 2026 Model Based Innovation LLC. All rights reserved.
Inputs
| Name | Type | Description |
|---|---|---|
cm input | NonSI.Length_cm | Value in centimetre |
Outputs
| Name | Type | Description |
|---|---|---|
m output | SI.Length | Value in metre |