.Buildings.Controls.OBC.CDL.Reals.Round

Round real number to given digits

Information

Block that outputs the input after rounding it to n digits.

For example,

Hence, the block outputs

    y = floor(u*(10^n) + 0.5)/(10^n)  for  u > 0,
    y = ceil(u*(10^n) - 0.5)/(10^n)   for  u < 0.

Revisions


Generated at 2025-03-13T19:24:49Z by OpenModelicaOpenModelica 1.24.5 using GenerateDoc.mos