summaryrefslogtreecommitdiff
path: root/src/lsq_funcs.mac
diff options
context:
space:
mode:
Diffstat (limited to 'src/lsq_funcs.mac')
-rw-r--r--src/lsq_funcs.mac6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lsq_funcs.mac b/src/lsq_funcs.mac
index cf86d7e..3bd124e 100644
--- a/src/lsq_funcs.mac
+++ b/src/lsq_funcs.mac
@@ -3,7 +3,7 @@
*/
x_undist_unrot : tan(m_view - c_view) * scale$
-y_undist_unrot : tan(m_nick - c_nick) * scale$
+y_undist_unrot : tan(c_nick - m_nick) * scale$
d : y_undist_unrot ^ 2 + x_undist_unrot ^ 2$
dist_fact : d ^2 * k1 + d * k0$
x_unrot : x_undist_unrot * (1 + dist_fact)$
@@ -15,8 +15,8 @@ y : y_unrot * cos(c_tilt) - x_unrot * sin(c_tilt)$
* Some mangling for C code generation
*/
-x_expand : trigexpand(x_unrot)$
-y_expand : trigexpand(y_unrot)$
+x_expand : trigexpand(x)$
+y_expand : trigexpand(y)$
args: "(double c_view, double c_nick, double c_tilt, double scale, double k0, double k1, double m_view, double m_nick)"$