summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/analog/nld_twoterm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/analog/nld_twoterm.h')
-rw-r--r--src/lib/netlist/analog/nld_twoterm.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/netlist/analog/nld_twoterm.h b/src/lib/netlist/analog/nld_twoterm.h
index b175f40af97..fbebe8be6cf 100644
--- a/src/lib/netlist/analog/nld_twoterm.h
+++ b/src/lib/netlist/analog/nld_twoterm.h
@@ -53,15 +53,15 @@
#warning "Do not include rescap.h in a netlist environment"
#endif
#ifndef RES_R
-#define RES_R(res) (static_cast<double>(res))
-#define RES_K(res) (static_cast<double>(res) * 1e3)
-#define RES_M(res) (static_cast<double>(res) * 1e6)
-#define CAP_U(cap) (static_cast<double>(cap) * 1e-6)
-#define CAP_N(cap) (static_cast<double>(cap) * 1e-9)
-#define CAP_P(cap) (static_cast<double>(cap) * 1e-12)
-#define IND_U(ind) (static_cast<double>(ind) * 1e-6)
-#define IND_N(ind) (static_cast<double>(ind) * 1e-9)
-#define IND_P(ind) (static_cast<double>(ind) * 1e-12)
+#define RES_R(res) (static_cast<nl_fptype>(res))
+#define RES_K(res) (static_cast<nl_fptype>(res) * 1e3)
+#define RES_M(res) (static_cast<nl_fptype>(res) * 1e6)
+#define CAP_U(cap) (static_cast<nl_fptype>(cap) * 1e-6)
+#define CAP_N(cap) (static_cast<nl_fptype>(cap) * 1e-9)
+#define CAP_P(cap) (static_cast<nl_fptype>(cap) * 1e-12)
+#define IND_U(ind) (static_cast<nl_fptype>(ind) * 1e-6)
+#define IND_N(ind) (static_cast<nl_fptype>(ind) * 1e-9)
+#define IND_P(ind) (static_cast<nl_fptype>(ind) * 1e-12)
#endif
#endif /* NLD_TWOTERM_H_ */