From bfdc3d514ba9d42652ec0570e1e235659990e057 Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Tue, 21 Apr 2026 07:55:22 +0200 Subject: [PATCH] Don't use Modelica.Math functions when defining constants The change for 'pi' avoids that it gets the unit "rad", and 'e' is updated to keep the two definitions consistent. --- Modelica/Constants.mo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modelica/Constants.mo b/Modelica/Constants.mo index 1bef5bd7ac..222d16a441 100644 --- a/Modelica/Constants.mo +++ b/Modelica/Constants.mo @@ -7,8 +7,8 @@ package Constants import Modelica.Units.NonSI; // Mathematical constants - final constant Real e(final unit="1") = Modelica.Math.exp(1.0); - final constant Real pi = 2*Modelica.Math.asin(1.0); // 3.14159265358979; + final constant Real e(final unit="1") = exp(1.0); + final constant Real pi = 2 * asin(1.0); // 3.14159265358979; final constant Real D2R(final unit="rad/deg") = pi/180 "Degree to Radian"; final constant Real R2D(final unit="deg/rad") = 180/pi "Radian to Degree"; final constant Real gamma(final unit="1") = 0.57721566490153286061