summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/analog/nlid_twoterm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/analog/nlid_twoterm.cpp')
-rw-r--r--src/lib/netlist/analog/nlid_twoterm.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/netlist/analog/nlid_twoterm.cpp b/src/lib/netlist/analog/nlid_twoterm.cpp
index c9d94c98f51..2234afd5cd6 100644
--- a/src/lib/netlist/analog/nlid_twoterm.cpp
+++ b/src/lib/netlist/analog/nlid_twoterm.cpp
@@ -64,10 +64,10 @@ NETLIB_RESET(POT)
{
nl_fptype v = m_Dial();
if (m_DialIsLog())
- v = (std::exp(v) - plib::constants<nl_fptype>::one()) / (std::exp(plib::constants<nl_fptype>::one()) - plib::constants<nl_fptype>::one());
+ v = (std::exp(v) - nlconst::one()) / (std::exp(nlconst::one()) - nlconst::one());
m_R1.set_R(std::max(m_R() * v, exec().gmin()));
- m_R2.set_R(std::max(m_R() * (plib::constants<nl_fptype>::one() - v), exec().gmin()));
+ m_R2.set_R(std::max(m_R() * (nlconst::one() - v), exec().gmin()));
}
NETLIB_UPDATE_PARAM(POT)
@@ -77,11 +77,11 @@ NETLIB_UPDATE_PARAM(POT)
nl_fptype v = m_Dial();
if (m_DialIsLog())
- v = (std::exp(v) - plib::constants<nl_fptype>::one()) / (std::exp(plib::constants<nl_fptype>::one()) - plib::constants<nl_fptype>::one());
+ v = (std::exp(v) - nlconst::one()) / (std::exp(nlconst::one()) - nlconst::one());
if (m_Reverse())
- v = plib::constants<nl_fptype>::one() - v;
+ v = nlconst::one() - v;
m_R1.set_R(std::max(m_R() * v, exec().gmin()));
- m_R2.set_R(std::max(m_R() * (plib::constants<nl_fptype>::one() - v), exec().gmin()));
+ m_R2.set_R(std::max(m_R() * (nlconst::one() - v), exec().gmin()));
}
@@ -94,9 +94,9 @@ NETLIB_RESET(POT2)
nl_fptype v = m_Dial();
if (m_DialIsLog())
- v = (std::exp(v) - plib::constants<nl_fptype>::one()) / (std::exp(plib::constants<nl_fptype>::one()) - plib::constants<nl_fptype>::one());
+ v = (std::exp(v) - nlconst::one()) / (std::exp(nlconst::one()) - nlconst::one());
if (m_Reverse())
- v = plib::constants<nl_fptype>::one() - v;
+ v = nlconst::one() - v;
m_R1.set_R(std::max(m_R() * v, exec().gmin()));
}
@@ -108,9 +108,9 @@ NETLIB_UPDATE_PARAM(POT2)
nl_fptype v = m_Dial();
if (m_DialIsLog())
- v = (std::exp(v) - plib::constants<nl_fptype>::one()) / (std::exp(plib::constants<nl_fptype>::one()) - plib::constants<nl_fptype>::one());
+ v = (std::exp(v) - nlconst::one()) / (std::exp(nlconst::one()) - nlconst::one());
if (m_Reverse())
- v = plib::constants<nl_fptype>::one() - v;
+ v = nlconst::one() - v;
m_R1.set_R(std::max(m_R() * v, exec().gmin()));
}
@@ -121,7 +121,7 @@ NETLIB_UPDATE_PARAM(POT2)
NETLIB_RESET(L)
{
m_gmin = exec().gmin();
- m_I = plib::constants<nl_fptype>::zero();
+ m_I = nlconst::zero();
m_G = m_gmin;
set_mat( m_G, -m_G, -m_I,
-m_G, m_G, m_I);
@@ -151,8 +151,8 @@ NETLIB_RESET(D)
nl_fptype Is = m_model.m_IS;
nl_fptype n = m_model.m_N;
- m_D.set_param(Is, n, exec().gmin(), constants::T0());
- set_G_V_I(m_D.G(), plib::constants<nl_fptype>::zero(), m_D.Ieq());
+ m_D.set_param(Is, n, exec().gmin(), nlconst::T0());
+ set_G_V_I(m_D.G(), nlconst::zero(), m_D.Ieq());
}
NETLIB_UPDATE_PARAM(D)
@@ -160,7 +160,7 @@ NETLIB_UPDATE_PARAM(D)
nl_fptype Is = m_model.m_IS;
nl_fptype n = m_model.m_N;
- m_D.set_param(Is, n, exec().gmin(), constants::T0());
+ m_D.set_param(Is, n, exec().gmin(), nlconst::T0());
}
NETLIB_UPDATE_TERMINALS(D)