CogniPilot

MODELICA LIBRARY · ENGINEERING REFERENCE

function

MathUtilities.norm2

Euclidean norm of a 2-vector

Public declarations

Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.

RoleNameTypeDimensions / attributes / defaultDescription
inputvalueReal[2]
outputresultReal

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;