function
MathUtilities.norm2
Euclidean norm of a 2-vector
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | value | Real | [2] | |
| output | result | Real | |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function norm2 "Euclidean norm of a 2-vector"
input Real value[2];
output Real result;
algorithm
result := sqrt(value * value);
annotation(Inline = true);
end norm2;